[gst-devel] Incomplete WMA files.
James Morrison
ja2morri at csclub.uwaterloo.ca
Mon Oct 4 00:31:08 CEST 2004
Hi,
Somehow I ended up with a bunch of incomplete wma files. I've tried them
with a few players/demuxers. What happens is that ffmpeg or vlc will play what
is there. However, rhythmbox will crash, and gst-launch-0.8 will play what
is available then start spinning or abort with a Bus Error/segfault.
The attached patch stops gstreamer applications from crashing. Unfortunatly,
rhythmbox starts spinning when trying to load wma files.
Thanks,
Jim
http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim
Index: ext/ffmpeg/gstffmpegdec.c
===================================================================
RCS file: /cvs/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegdec.c,v
retrieving revision 1.64
diff -u -p -r1.64 gstffmpegdec.c
--- ext/ffmpeg/gstffmpegdec.c 2 Oct 2004 20:26:10 -0000 1.64
+++ ext/ffmpeg/gstffmpegdec.c 4 Oct 2004 04:04:29 -0000
@@ -445,7 +445,7 @@ gst_ffmpegdec_chain (GstPad * pad, GstDa
return;
}
- if (have_data) {
+ if (len >= 0 && have_data) {
GST_BUFFER_SIZE (outbuf) = have_data;
if (GST_CLOCK_TIME_IS_VALID (expected_ts)) {
GST_BUFFER_TIMESTAMP (outbuf) = expected_ts;
@@ -455,7 +455,10 @@ gst_ffmpegdec_chain (GstPad * pad, GstDa
expected_ts += GST_BUFFER_DURATION (outbuf);
}
} else {
+ GST_ERROR_OBJECT (ffmpegdec, "ffdec_%s: decoding error",
+ oclass->in_plugin->name);
gst_buffer_unref (outbuf);
+ return;
}
break;
default:
@@ -463,12 +466,6 @@ gst_ffmpegdec_chain (GstPad * pad, GstDa
break;
}
- if (len < 0) {
- GST_ERROR_OBJECT (ffmpegdec, "ffdec_%s: decoding error",
- oclass->in_plugin->name);
- break;
- }
-
if (have_data) {
if (!GST_PAD_CAPS (ffmpegdec->srcpad)) {
GstCaps *caps;
More information about the gstreamer-devel
mailing list