diff options
author | wm4 <wm4@nowhere> | 2014-01-11 01:33:07 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-01-11 01:33:07 +0100 |
commit | 85e90668ae10fb025d7c450eb7eb37b48c9eded1 (patch) | |
tree | 3c3b2cb0fe27a0cd539073d4df2e92ace4da3fed /video | |
parent | 14bd02a034f1361485b72dff3e3247b300700954 (diff) | |
download | mpv-85e90668ae10fb025d7c450eb7eb37b48c9eded1.tar.bz2 mpv-85e90668ae10fb025d7c450eb7eb37b48c9eded1.tar.xz |
vd_lavc: minor simplification
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/vd_lavc.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 355db26556..bc3f06362e 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -315,10 +315,7 @@ static void set_from_bih(AVCodecContext *avctx, uint32_t format, /* AVRn stores huffman table in AVI header */ /* Pegasus MJPEG stores it also in AVI header, but it uses the common * MJPG fourcc :( */ - if (bih->biSize <= sizeof(*bih)) - break; av_opt_set_int(avctx, "extern_huff", 1, AV_OPT_SEARCH_CHILDREN); - mp_lavc_set_extradata(avctx, bih + 1, bih->biSize - sizeof(*bih)); break; case MP_FOURCC('R','V','1','0'): @@ -333,18 +330,12 @@ static void set_from_bih(AVCodecContext *avctx, uint32_t format, format == MP_FOURCC('R','V','1','3') ? 0x10003001 : 0x10000000, }; mp_lavc_set_extradata(avctx, &extradata, 8); - } else { - // has extra slice header (demux_rm or rm->avi streamcopy) - mp_lavc_set_extradata(avctx, bih + 1, bih->biSize - sizeof(*bih)); } break; + } - default: - if (bih->biSize <= sizeof(*bih)) - break; + if (bih->biSize > sizeof(*bih) && avctx->extradata_size == 0) mp_lavc_set_extradata(avctx, bih + 1, bih->biSize - sizeof(*bih)); - break; - } avctx->bits_per_coded_sample = bih->biBitCount; avctx->coded_width = bih->biWidth; |