diff options
author | Benjamin Larsson <banan@ludd.ltu.se> | 2007-03-10 09:20:07 +0000 |
---|---|---|
committer | Benjamin Larsson <banan@ludd.ltu.se> | 2007-03-10 09:20:07 +0000 |
commit | 64472fcff1cae404a4cd6375ad0c86b7e6e4dbcc (patch) | |
tree | d9b1abc210b58bc5dfd597e9b5468aa82699817e /libavcodec/flashsvenc.c | |
parent | 6b74787b89118efe3c3e6f74dd3096d23ee24fdc (diff) | |
download | ffmpeg-64472fcff1cae404a4cd6375ad0c86b7e6e4dbcc.tar.gz |
Simplify, use avctx->frame_number.
Originally committed as revision 8309 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flashsvenc.c')
-rw-r--r-- | libavcodec/flashsvenc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index 80692eec73..be07c65b48 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -68,7 +68,6 @@ typedef struct FlashSVContext { AVCodecContext *avctx; uint8_t *previous_frame; AVFrame frame; - int first_frame; int image_width, image_height; int block_width, block_height; uint8_t* tmpblock; @@ -113,8 +112,6 @@ static int flashsv_encode_init(AVCodecContext *avctx) return -1; } - s->first_frame = 1; - // Needed if zlib unused or init aborted before deflateInit memset(&(s->zstream), 0, sizeof(z_stream)); /* @@ -241,14 +238,13 @@ static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_siz *p = *pict; - if (s->first_frame) { + if (avctx->frame_number == 0) { s->previous_frame = av_mallocz(p->linesize[0]*s->image_height); if (!s->previous_frame) { av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n"); return -1; } I_frame = 1; - s->first_frame = 0; } #if 0 |