summaryrefslogtreecommitdiff
path: root/libavcodec/dvdsubdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-01 14:01:02 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-01 14:01:02 +0100
commit4a356512676629b4a289ea33f2b39b5f151cfae3 (patch)
treec4391d9281d285e0c5c53a4000a3918de7dbaf31 /libavcodec/dvdsubdec.c
parentf016a23c7fa0b089a394e25eeefa5d5f4d99d926 (diff)
parentd6da372984c87fd6288c148c291065d6032ceda3 (diff)
Merge commit 'd6da372984c87fd6288c148c291065d6032ceda3'
* commit 'd6da372984c87fd6288c148c291065d6032ceda3': eacmv: stop using deprecated avcodec_set_dimensions dvdsubdec: stop using deprecated avcodec_set_dimensions dvdec: stop using deprecated avcodec_set_dimensions dpx: stop using deprecated avcodec_set_dimensions Conflicts: libavcodec/dpx.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/eacmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvdsubdec.c')
-rw-r--r--libavcodec/dvdsubdec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index f0dd289139..87afc1e7ba 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -21,6 +21,8 @@
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
+#include "internal.h"
+
#include "libavutil/attributes.h"
#include "libavutil/colorspace.h"
#include "libavutil/opt.h"
@@ -598,9 +600,11 @@ static int dvdsub_parse_extradata(AVCodecContext *avctx)
parse_palette(ctx, data + 8);
} else if (strncmp("size:", data, 5) == 0) {
int w, h;
- if (sscanf(data + 5, "%dx%d", &w, &h) == 2 &&
- av_image_check_size(w, h, 0, avctx) >= 0)
- avcodec_set_dimensions(avctx, w, h);
+ if (sscanf(data + 5, "%dx%d", &w, &h) == 2) {
+ int ret = ff_set_dimensions(avctx, w, h);
+ if (ret < 0)
+ return ret;
+ }
}
data += pos;