demux_mkv: support more formats with V_UNCOMPRESSED

Select the generic raw video decoder in codecs.cfg ("MPrv" FourCC),
which forces the generic lavc raw video decoder "rawvideo". This means
all FourCCs understood by lavc rawvideo are supported, not just whatever
has codecs.cfg entries.
This commit is contained in:
wm4 2013-01-30 00:57:07 +01:00
parent 237b7491e2
commit 0421e17c2b
1 changed files with 6 additions and 0 deletions

View File

@ -1170,6 +1170,7 @@ static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track,
{
BITMAPINFOHEADER *bih;
sh_video_t *sh_v;
bool raw = false;
if (track->ms_compat) { /* MS compatibility mode */
BITMAPINFOHEADER *src;
@ -1235,6 +1236,7 @@ static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track,
} else if (strcmp(track->codec_id, MKV_V_UNCOMPRESSED) == 0) {
// raw video, "like AVI" - this is a FourCC
bih->biCompression = track->colorspace;
raw = true;
} else {
const videocodec_info_t *vi = vinfo;
while (vi->id && strcmp(vi->id, track->codec_id))
@ -1263,6 +1265,10 @@ static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track,
sh_v->gsh->title = talloc_strdup(sh_v, track->name);
sh_v->bih = bih;
sh_v->format = sh_v->bih->biCompression;
if (raw) {
sh_v->format = mmioFOURCC('M', 'P', 'r', 'v');
sh_v->imgfmt = sh_v->bih->biCompression;
}
if (track->v_frate == 0.0)
track->v_frate = 25.0;
sh_v->fps = track->v_frate;