diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-10-04 22:26:43 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-10-04 22:26:43 +0000 |
commit | 7ccc636f03189f1f1b68ee812fb8f965fd21bfb0 (patch) | |
tree | 3a250924882a03522da4c5052fc62ba2b3fa3b1a /libavformat/avidec.c | |
parent | f080a7bd90bd093820156d2eefcad027f7139ea1 (diff) | |
download | ffmpeg-7ccc636f03189f1f1b68ee812fb8f965fd21bfb0.tar.gz |
Favor even chunk sizes in ambiguous cases.
Fixes transcode_069_produces_uneven_chunk_size.avi.
Originally committed as revision 15557 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r-- | libavformat/avidec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 1a9a11c439..eaccd41fe5 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -52,6 +52,7 @@ typedef struct { int64_t movi_end; int64_t fsize; int64_t movi_list; + int64_t last_pkt_pos; int index_loaded; int is_odml; int non_interleaved; @@ -701,6 +702,7 @@ resync: if(size > ast->remaining) size= ast->remaining; + avi->last_pkt_pos= url_ftell(pb); av_get_packet(pb, pkt, size); if(ast->has_pal && pkt->data && pkt->size<(unsigned)INT_MAX/2){ @@ -782,6 +784,9 @@ resync: n= get_stream_idx(d); + if(!((i-avi->last_pkt_pos)&1) && get_stream_idx(d+1) < s->nb_streams) + continue; + //parse ##dc/##wb if(n < s->nb_streams){ AVStream *st; |