fraps: cosmetics, reformat

pull/8/head
Anton Khirnov 12 years ago
parent 57d11e5e28
commit 80344261aa
  1. 14
      libavcodec/fraps.c

@ -75,7 +75,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
* Comparator - our nodes should ascend by count
* but with preserved symbol order
*/
static int huff_cmp(const void *va, const void *vb){
static int huff_cmp(const void *va, const void *vb)
{
const Node *a = va, *b = vb;
return (a->count - b->count)*256 + a->sym - b->sym;
}
@ -110,8 +111,10 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
/* lines are stored as deltas between previous lines
* and we need to add 0x80 to the first lines of chroma planes
*/
if(j) dst[i] += dst[i - stride];
else if(Uoff) dst[i] += 0x80;
if (j)
dst[i] += dst[i - stride];
else if (Uoff)
dst[i] += 0x80;
if (get_bits_left(&gb) < 0) {
ff_free_vlc(&vlc);
return AVERROR_INVALIDDATA;
@ -127,9 +130,9 @@ static int decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
FrapsContext * const s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
FrapsContext * const s = avctx->priv_data;
AVFrame *frame = data;
AVFrame * const f = &s->frame;
uint32_t header;
@ -170,7 +173,8 @@ static int decode_frame(AVCodecContext *avctx,
(buf_size != header_size)) {
av_log(avctx, AV_LOG_ERROR,
"Invalid frame length %d (should be %d)\n",
buf_size, avctx->width*avctx->height*3/2+header_size);
buf_size,
avctx->width * avctx->height * 3 / 2 + header_size);
return AVERROR_INVALIDDATA;
}

Loading…
Cancel
Save