1
mirror of https://github.com/mpv-player/mpv synced 2024-09-12 23:45:53 +02:00

Do proper parsing for DVR-MS files, this fixes playback with ffmpeg decoder

and also will create proper files when remuxing into e.g. AVI.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26328 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2008-04-05 11:09:21 +00:00
parent e826cc2d72
commit af654481c0

View File

@ -81,6 +81,8 @@ static video_codec_t find_video_codec(sh_video_t *sh_video)
else if((fmt == DEMUXER_TYPE_MPEG_PS || fmt == DEMUXER_TYPE_MPEG_TS) &&
(sh_video->format==mmioFOURCC('W', 'V', 'C', '1')))
return VIDEO_VC1;
else if (fmt == DEMUXER_TYPE_ASF && sh_video->bih && sh_video->bih->biCompression == mmioFOURCC('D', 'V', 'R', ' '))
return VIDEO_MPEG12;
else
return VIDEO_OTHER;
}
@ -250,6 +252,10 @@ switch(video_codec){
break;
}
case VIDEO_MPEG12: {
if (d_video->demuxer->file_format == DEMUXER_TYPE_ASF) { // DVR-MS
if(!sh_video->bih) return 0;
sh_video->format=sh_video->bih->biCompression;
}
mpeg_header_parser:
// Find sequence_header first:
videobuf_len=0; videobuf_code_len=0;