openbsd-ports/x11/mplayer/patches/patch-libmpdemux_demuxer_c

29 lines
1016 B
Plaintext

$OpenBSD: patch-libmpdemux_demuxer_c,v 1.2 2005/09/04 23:51:52 espie Exp $
--- libmpdemux/demuxer.c.orig Sat Sep 3 14:28:45 2005
+++ libmpdemux/demuxer.c Sat Sep 3 14:40:33 2005
@@ -1350,7 +1350,12 @@ switch(file_format){
case DEMUXER_TYPE_MPEG_TY:
case DEMUXER_TYPE_MPEG_PS: {
- sh_video=d_video->sh;sh_video->ds=d_video;
+ if (d_video)
+ sh_video=d_video->sh;
+ else
+ sh_video = NULL;
+ if (sh_video)
+ sh_video->ds=d_video;
// if(demuxer->stream->type!=STREAMTYPE_VCD) demuxer->movi_start=0; // for VCD
if(audio_id!=-2) {
@@ -1404,8 +1409,8 @@ pts_from_bps=0; // !!!
if ((sh_video=demuxer->video->sh) && sh_video->bih)
mp_msg(MSGT_DEMUX,MSGL_INFO,"VIDEO: [%.4s] %ldx%ld %dbpp %5.3f fps %5.1f kbps (%4.1f kbyte/s)\n",
(char *)&sh_video->bih->biCompression,
- sh_video->bih->biWidth,
- sh_video->bih->biHeight,
+ (long) sh_video->bih->biWidth,
+ (long) sh_video->bih->biHeight,
sh_video->bih->biBitCount,
sh_video->fps,
sh_video->i_bps*0.008f,