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
Hi, On 16 May 2003 15:49:24 -0400 Greg Stark <gsstark@mit.edu> wrote: I forwarded this patch to -dev-eng, where it belongs to. Please read DOCS/tech/patches.txt for instructions how to send patches.
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.
There is no common style of indenting whithin mplayer. Different parts of the code are maintained by different people using their own style. When sending patches it's a good idea to imitate the indentation style, but it's not the most important, the code just needs to be readable (and working, of course). Attila Kinali -- 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
participants (2)
-
Attila Kinali -
Greg Stark