From f7813a5324be39d13ab536c245d15dfc602a7849 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 29 Dec 2013 12:19:38 +0000 Subject: basic type mechanism working --- ffmpeg/libavcodec/flvdec.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ffmpeg/libavcodec/flvdec.c') diff --git a/ffmpeg/libavcodec/flvdec.c b/ffmpeg/libavcodec/flvdec.c index bb693d7..f425f00 100644 --- a/ffmpeg/libavcodec/flvdec.c +++ b/ffmpeg/libavcodec/flvdec.c @@ -102,11 +102,13 @@ int ff_flv_decode_picture_header(MpegEncContext *s) s->h263_long_vectors = 0; /* PEI */ - while (get_bits1(&s->gb) != 0) { - skip_bits(&s->gb, 8); - } + if (skip_1stop_8data_bits(&s->gb) < 0) + return AVERROR_INVALIDDATA; s->f_code = 1; + if (s->ehc_mode) + s->avctx->sample_aspect_ratio= (AVRational){1,2}; + if(s->avctx->debug & FF_DEBUG_PICT_INFO){ av_log(s->avctx, AV_LOG_DEBUG, "%c esc_type:%d, qp:%d num:%d\n", s->droppable ? 'D' : av_get_picture_type_char(s->pict_type), @@ -121,6 +123,7 @@ int ff_flv_decode_picture_header(MpegEncContext *s) AVCodec ff_flv_decoder = { .name = "flv", + .long_name = NULL_IF_CONFIG_SMALL("FLV / Sorenson Spark / Sorenson H.263 (Flash Video)"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_FLV1, .priv_data_size = sizeof(MpegEncContext), @@ -129,6 +132,5 @@ AVCodec ff_flv_decoder = { .decode = ff_h263_decode_frame, .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, .max_lowres = 3, - .long_name = NULL_IF_CONFIG_SMALL("FLV / Sorenson Spark / Sorenson H.263 (Flash Video)"), .pix_fmts = ff_pixfmt_list_420, }; -- cgit v1.2.3