OSDN Git Service

avcodec/lagarith: reenable buggy lag_decode_zero_run_line()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 30 Dec 2013 12:47:34 +0000 (13:47 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 30 Dec 2013 12:47:34 +0000 (13:47 +0100)
This is to prevent regressions in case the old code was able to partly
decode frames (no way to say without a testcase)
Add a memset to prevent use of uninitialized memory until we have a
testcase and can test/fix it

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/lagarith.c

index 710558c..66346d0 100644 (file)
@@ -370,7 +370,8 @@ static int lag_decode_zero_run_line(LagarithContext *l, uint8_t *dst,
     uint8_t *end = dst + (width - 2);
 
     avpriv_request_sample(l->avctx, "zero_run_line");
-    return AVERROR_PATCHWELCOME;
+
+    memset(dst, 0, width);
 
 output_zeros:
     if (l->zeros_rem) {