Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r--libavcodec/vp3.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 1e5547443f..28f0569d55 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -2018,17 +2018,19 @@ static int vp3_decode_frame(AVCodecContext *avctx,
vp3_decode_end(avctx);
ret = theora_decode_header(avctx, &gb);
+ if (ret >= 0)
+ ret = vp3_decode_init(avctx);
if (ret < 0) {
vp3_decode_end(avctx);
- } else
- ret = vp3_decode_init(avctx);
+ }
return ret;
} else if (type == 2) {
ret = theora_decode_tables(avctx, &gb);
+ if (ret >= 0)
+ ret = vp3_decode_init(avctx);
if (ret < 0) {
vp3_decode_end(avctx);
- } else
- ret = vp3_decode_init(avctx);
+ }
return ret;
}