diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-25 14:59:15 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-25 14:59:15 +0200 |
commit | 3ed6917ab88424bff0d6c53e51781a93ec5fe8f7 (patch) | |
tree | 3ca019989e1abe86762fe2b642a99309411ae716 /libavcodec/ffv1.c | |
parent | c24ca7b88e6388cdd5106bf612b86ba702ac9516 (diff) | |
download | ffmpeg-3ed6917ab88424bff0d6c53e51781a93ec5fe8f7.tar.gz |
ffv1: store slice size with all slices in 1.3
This simplifies handling by removing a special case.
Its also needed to make the next change possible.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r-- | libavcodec/ffv1.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index 43ab3964de..fc68c8ca28 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -1290,7 +1290,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, flush_put_bits(&fs->pb); //nicer padding FIXME bytes= fs->ac_byte_count + (put_bits_count(&fs->pb)+7)/8; } - if(i>0 || f->ec){ + if(i>0 || f->version>2){ av_assert0(bytes < pkt->size/f->slice_count); memmove(buf_p, fs->c.bytestream_start, bytes); av_assert0(bytes < (1<<24)); @@ -1992,8 +1992,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac int trailer = 3 + 5*!!f->ec; int v; - if(i || f->ec) v = AV_RB24(buf_p-trailer)+trailer; - else v = buf_p - c->bytestream_start; + if(i || f->version>2) v = AV_RB24(buf_p-trailer)+trailer; + else v = buf_p - c->bytestream_start; if(buf_p - c->bytestream_start < v){ av_log(avctx, AV_LOG_ERROR, "Slice pointer chain broken\n"); return -1; |