From 589f4871ea0ef4e95065906192f7329096e33ab0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 11 Jan 2014 01:43:40 +0100 Subject: [PATCH] vd_lavc: matroska: remove weird realvideo special handling This case can't happen with the normal realvideo codepath in demux_mkv.c, because the code would errors out if the extradata is too small, and everything would be broken anyway in the case the vd_lavc.c condition is actually triggered. It still might happen with VfW-muxed realvideo in Matroska, though. Basically, I'm hoping this doesn't matter anyway, and that the vd_lavc.c code was for other old demuxers, like demux_avi or demux_rm. Following the commit history, it's not really clear for what demuxer this code was added. --- video/decode/vd_lavc.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index bc3f06362e..74bffb23b7 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -317,24 +317,9 @@ static void set_from_bih(AVCodecContext *avctx, uint32_t format, * MJPG fourcc :( */ av_opt_set_int(avctx, "extern_huff", 1, AV_OPT_SEARCH_CHILDREN); break; - - case MP_FOURCC('R','V','1','0'): - case MP_FOURCC('R','V','1','3'): - case MP_FOURCC('R','V','2','0'): - case MP_FOURCC('R','V','3','0'): - case MP_FOURCC('R','V','4','0'): - if (bih->biSize < sizeof(*bih) + 8) { - // only 1 packet per frame & sub_id from fourcc - uint32_t extradata[2] = { - 0, - format == MP_FOURCC('R','V','1','3') ? 0x10003001 : 0x10000000, - }; - mp_lavc_set_extradata(avctx, &extradata, 8); - } - break; } - if (bih->biSize > sizeof(*bih) && avctx->extradata_size == 0) + if (bih->biSize > sizeof(*bih)) mp_lavc_set_extradata(avctx, bih + 1, bih->biSize - sizeof(*bih)); avctx->bits_per_coded_sample = bih->biBitCount;