mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
lavc/dvdsubdec: parse the size from the extradata.
This commit is contained in:
parent
d83ff76ca0
commit
3b6e9cd7ec
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user