1
mirror of https://github.com/mpv-player/mpv synced 2024-10-30 04:46:41 +01:00

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.
This commit is contained in:
wm4 2014-01-11 01:43:40 +01:00
parent 85e90668ae
commit 589f4871ea

View File

@ -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;