Commit 3b6e9cd7 authored by Clément Bœsch's avatar Clément Bœsch

lavc/dvdsubdec: parse the size from the extradata.

parent d83ff76c
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "get_bits.h" #include "get_bits.h"
#include "dsputil.h" #include "dsputil.h"
#include "libavutil/colorspace.h" #include "libavutil/colorspace.h"
#include "libavutil/imgutils.h"
//#define DEBUG //#define DEBUG
...@@ -540,6 +541,11 @@ static int dvdsub_init(AVCodecContext *avctx) ...@@ -540,6 +541,11 @@ static int dvdsub_init(AVCodecContext *avctx)
while(*p == ',' || isspace(*p)) while(*p == ',' || isspace(*p))
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; data += pos;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment