diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-08-05 20:03:37 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-08-05 20:03:37 +0000 |
commit | d7826b58d2740966cb8f85387591b49b18c241ee (patch) | |
tree | 33774df6a41981773b2c38555a787c95969a2847 /libavcodec/msmpeg4.c | |
parent | a3be5e589b4e483463cf9ff41a29af788de46047 (diff) | |
download | ffmpeg-d7826b58d2740966cb8f85387591b49b18c241ee.tar.gz |
make wmv1 and wmv2 playable with M$ DMO decoder
Originally committed as revision 9950 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/msmpeg4.c')
-rw-r--r-- | libavcodec/msmpeg4.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index fec804b029..f21fed7946 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -883,7 +883,7 @@ void ff_msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n) } else { rl = &rl_table[3 + s->rl_chroma_table_index]; } - run_diff = s->msmpeg4_version>=6; + run_diff = s->msmpeg4_version>=4; scantable= s->intra_scantable.permutated; } else { i = 0; @@ -942,6 +942,9 @@ else run1 = run - rl->max_run[last][level] - run_diff; if (run1 < 0) goto esc3; + code = get_rl_index(rl, last, run1+1, level); + if (s->msmpeg4_version == 4 && code == rl->n) + goto esc3; code = get_rl_index(rl, last, run1, level); if (code == rl->n) { esc3: @@ -1641,7 +1644,7 @@ static inline int msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block, } block[0] = level; - run_diff = 0; + run_diff = s->msmpeg4_version >= 4; i = 0; if (!coded) { goto not_coded; |