summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/flvdec.c
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/flvdec.c
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/flvdec.c')
-rw-r--r--ffmpeg/libavcodec/flvdec.c10
1 files changed, 6 insertions, 4 deletions
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,
};