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:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-17 02:50:20 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-17 03:07:34 +0300
commit7f769ae41e0dca0f538ad6bdad5f9471fd5ee87f (patch)
treeb2628440f15a29eb489ff331e0d113e6a0f9394f /libavcodec/rv30.c
parentd3eb317b862c3f5653f0ae8dfcb22edf1713ab5b (diff)
avcodec/rv30: fix switching back to the original resolution
Fixes part of Ticket1388 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/rv30.c')
-rw-r--r--libavcodec/rv30.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c
index f8c7ed4608..3b9868cd5e 100644
--- a/libavcodec/rv30.c
+++ b/libavcodec/rv30.c
@@ -67,6 +67,9 @@ static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn
w = r->s.avctx->extradata[6 + rpr*2] << 2;
h = r->s.avctx->extradata[7 + rpr*2] << 2;
+ } else {
+ w = r->orig_width;
+ h = r->orig_height;
}
si->width = w;
si->height = h;
@@ -259,6 +262,9 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx)
RV34DecContext *r = avctx->priv_data;
int ret;
+ r->orig_width = avctx->coded_width;
+ r->orig_height = avctx->coded_height;
+
if (avctx->extradata_size < 2) {
av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n");
return AVERROR(EINVAL);