mirror of https://github.com/mpv-player/mpv
Fix segfault if an 'strf' chunk couldn't be found in avi
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23772 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
338f0e6a1f
commit
e3d05e9971
|
@ -85,6 +85,9 @@ switch(video_codec){
|
||||||
case VIDEO_OTHER: {
|
case VIDEO_OTHER: {
|
||||||
if((d_video->demuxer->file_format == DEMUXER_TYPE_ASF) || (d_video->demuxer->file_format == DEMUXER_TYPE_AVI)) {
|
if((d_video->demuxer->file_format == DEMUXER_TYPE_ASF) || (d_video->demuxer->file_format == DEMUXER_TYPE_AVI)) {
|
||||||
// display info:
|
// display info:
|
||||||
|
// 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;
|
sh_video->format=sh_video->bih->biCompression;
|
||||||
|
|
||||||
sh_video->disp_w=sh_video->bih->biWidth;
|
sh_video->disp_w=sh_video->bih->biWidth;
|
||||||
|
|
Loading…
Reference in New Issue