[FFmpeg-cvslog] mpeg12enc: Don't set up run-level info for level 0.
Alex Converse
git at videolan.org
Tue Nov 8 02:22:01 CET 2011
ffmpeg | branch: master | Alex Converse <alex.converse at gmail.com> | Thu Nov 3 15:56:37 2011 -0700| [7c5dfc174be59afa671a98ec85fe208c528ab64f] | committer: Alex Converse
mpeg12enc: Don't set up run-level info for level 0.
run: The number of zero coefficients preceding a non-zero coefficient,
in the scan order. The absolute value of the non-zero coefficient is
called "level".
The run-level code makes illegal reads when trying to set up tables for
nonsense level 0.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c5dfc174be59afa671a98ec85fe208c528ab64f
---
libavcodec/mpeg12enc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 5dedabd..26d26c7 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -74,6 +74,8 @@ static void init_uni_ac_vlc(RLTable *rl, uint8_t *uni_ac_vlc_len){
for(i=0; i<128; i++){
int level= i-64;
int run;
+ if (!level)
+ continue;
for(run=0; run<64; run++){
int len, bits, code;
More information about the ffmpeg-cvslog
mailing list