demux: fix video with demux_mpg (DVD playback)

Commit 4d016a9 changed how demuxers report the codec of each stream.
Some of that was missed in video.c, which is important for legacy
demuxers (demux_mpg was broken by this, which is needed for DVD
playback).

Not sure about the ASF/AVI related change, but this is also a legacy
demuxers only codepath.
This commit is contained in:
wm4 2013-02-11 07:57:47 +01:00
parent 1f7decc1a0
commit 517d6dbfca
1 changed files with 4 additions and 1 deletions

View File

@ -99,6 +99,7 @@ switch(video_codec){
// in case no strf chunk has been seen in avi, we have no bitmap header
if(!sh_video->bih) return 0;
sh_video->format=sh_video->bih->biCompression;
mp_set_video_codec_from_tag(sh_video);
sh_video->disp_w=sh_video->bih->biWidth;
sh_video->disp_h=abs(sh_video->bih->biHeight);
}
@ -392,7 +393,9 @@ mpeg_header_parser:
break;
}
} // switch(file_format)
if (d_video->demuxer->file_format == DEMUXER_TYPE_MPEG_PS ||
d_video->demuxer->file_format == DEMUXER_TYPE_MPEG_TS)
mp_set_video_codec_from_tag(sh_video);
return 1;
}