diff options
author | Clément Bœsch <ubitux@gmail.com> | 2012-09-04 17:49:15 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-09-04 23:38:29 +0200 |
commit | 3b6e9cd7ec72e3bd17aed4e053cef4c6a349d3db (patch) | |
tree | 498b47831df637393f883338e5cc6929df3ea346 /libavcodec | |
parent | d83ff76ca0e1ec905ca2d5b27bd0973991eadbd9 (diff) | |
download | ffmpeg-3b6e9cd7ec72e3bd17aed4e053cef4c6a349d3db.tar.gz |
lavc/dvdsubdec: parse the size from the extradata.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dvdsubdec.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 3eba2dfce9..90593d0833 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -22,6 +22,7 @@ #include "get_bits.h" #include "dsputil.h" #include "libavutil/colorspace.h" +#include "libavutil/imgutils.h" //#define DEBUG @@ -540,6 +541,11 @@ static int dvdsub_init(AVCodecContext *avctx) while(*p == ',' || isspace(*p)) p++; } + } 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); } data += pos; |