[FFmpeg-cvslog] dvdsubdec: parse the size from the extradata
Clément Bœsch
git at videolan.org
Sun Jan 20 14:02:00 CET 2013
ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Wed Jan 16 18:42:16 2013 +0100| [40976257bc35b1649ffde3bd4598a9cf3573ebf3] | committer: Luca Barbato
dvdsubdec: parse the size from the extradata
Signed-off-by: Alexandra Khirnova <alexandra.khirnova at gmail.com>
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40976257bc35b1649ffde3bd4598a9cf3573ebf3
---
libavcodec/dvdsubdec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index f29d278..7afdd27 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
@@ -524,6 +525,11 @@ static int dvdsub_init(AVCodecContext *avctx)
while (*p == ',' || isspace(*p))
p++;
}
+ } else if (!strncmp("size:", cur, 5)) {
+ int w, h;
+ if (sscanf(cur + 5, "%dx%d", &w, &h) == 2 &&
+ av_image_check_size(w, h, 0, avctx) >= 0)
+ avcodec_set_dimensions(avctx, w, h);
}
cur += strcspn(cur, "\n\r");
cur += strspn(cur, "\n\r");
More information about the ffmpeg-cvslog
mailing list