[MPlayer-dev-eng] [PATCH] Fw: [Mplayer-advusers] patch for previously described bug

Attila Kinali kinali at gmx.net
Sat May 17 11:04:21 CEST 2003


Hi,

Can someone have a look at this ?

Thanks

		Attila Kinali



Begin forwarded message:

Date: 16 May 2003 15:49:24 -0400
From: Greg Stark <gsstark at mit.edu>
To: mplayer-advusers at mplayerhq.hu
Subject: [Mplayer-advusers] patch for previously described bug



So I'm not sure if this video file is corrupt or if there's a bug elsewhere
but it seems read_video_properties() doesn't check its arguments at all.

I'm a bit puzzled why no video stream is found but I don't really have any
solid evidence that there is a valid video stream either. I added a check for
the lack of a video stream and now at least I just get a clean exit:

ASF: No video stream found.
ASF: No audio stream found -> no sound.
Video: Cannot read properties.
No stream found.


Exiting... (End of file)


--- libmpdemux/video.c.~1.39.~	2003-04-04 10:38:46.000000000 -0500
+++ libmpdemux/video.c	2003-05-16 15:43:34.000000000 -0400
@@ -35,8 +35,11 @@
 static float telecine_cnt=-2.5;
 
 int video_read_properties(sh_video_t *sh_video){
-demux_stream_t *d_video=sh_video->ds;
-
+demux_stream_t *d_video = sh_video->ds;
+if (!d_video) {
+  return 0;
+}
+   
 // Determine image properties:
 switch(d_video->demuxer->file_format){
  case DEMUXER_TYPE_AVI:


PS: I couldn't for the life of me figure out the indentation style in use
    here, I tried to mimic what I saw though.

-- 
greg

_______________________________________________
Mplayer-advusers mailing list
Mplayer-advusers at mplayerhq.hu
http://mplayerhq.hu/mailman/listinfo/mplayer-advusers



-- 
Emacs ist für mich kein Editor. Für mich ist das genau das gleiche, als wenn
ich nach einem Fahrrad (für die Sonntagbrötchen) frage und einen pangalaktischen
Raumkreuzer mit 10 km Gesamtlänge bekomme. Ich weiß nicht, was ich damit soll.
		-- Frank Klemm, de.comp.os.unix.discussion



More information about the MPlayer-dev-eng mailing list