From: Benjamin O. <co...@us...> - 2003-11-04 22:31:18
|
CVS Root: /cvsroot/gstreamer Module: gst-plugins Changes by: company Date: Tue Nov 04 2003 14:31:17 PST Log message: random fixes to ffmpeg: decoding of mp3 now works, call parent_class->dispose Modified files: ext/ffmpeg : gstffmpegcodecmap.c gstffmpegdec.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/ffmpeg/gstffmpegcodecmap.c.diff?r1=1.19&r2=1.20 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/ffmpeg/gstffmpegdec.c.diff?r1=1.31&r2=1.32 ====Begin Diffs==== Index: gstffmpegcodecmap.c =================================================================== RCS file: /cvsroot/gstreamer/gst-plugins/ext/ffmpeg/gstffmpegcodecmap.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- gstffmpegcodecmap.c 31 Oct 2003 03:43:25 -0000 1.19 +++ gstffmpegcodecmap.c 4 Nov 2003 22:31:05 -0000 1.20 @@ -111,31 +111,31 @@ break; case CODEC_ID_MP2: - caps = GST_FF_AUD_CAPS_NEW ("ffmpeg_mp2", - "audio/mpeg", - "layer", GST_PROPS_INT (2) - ); + caps = GST_CAPS_NEW ("ffmpeg_mp2", + "audio/mpeg", + "layer", GST_PROPS_INT (2) + ); break; case CODEC_ID_MP3LAME: - caps = GST_FF_AUD_CAPS_NEW ("ffmpeg_mp3", - "audio/mpeg", - "layer", GST_PROPS_INT (3) - ); + caps = GST_CAPS_NEW ("ffmpeg_mp3", + "audio/mpeg", + "layer", GST_PROPS_INT (3) + ); break; case CODEC_ID_VORBIS: /* FIXME? vorbis or ogg? */ - caps = GST_FF_AUD_CAPS_NEW ("ffmpeg_vorbis", - "application/ogg", - NULL - ); + caps = GST_CAPS_NEW ("ffmpeg_vorbis", + "application/ogg", + NULL + ); break; case CODEC_ID_AC3: - caps = GST_FF_AUD_CAPS_NEW ("ffmpeg_ac3", - "audio/x-ac3", - NULL - ); + caps = GST_CAPS_NEW ("ffmpeg_ac3", + "audio/x-ac3", + NULL + ); break; case CODEC_ID_MJPEG: Index: gstffmpegdec.c =================================================================== RCS file: /cvsroot/gstreamer/gst-plugins/ext/ffmpeg/gstffmpegdec.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- gstffmpegdec.c 2 Nov 2003 19:07:41 -0000 1.31 +++ gstffmpegdec.c 4 Nov 2003 22:31:05 -0000 1.32 @@ -163,7 +163,7 @@ gobject_class = (GObjectClass*)klass; gstelement_class = (GstElementClass*)klass; - parent_class = g_type_class_ref(GST_TYPE_ELEMENT); + parent_class = g_type_class_peek_parent (klass); gobject_class->dispose = gst_ffmpegdec_dispose; gstelement_class->change_state = gst_ffmpegdec_change_state; @@ -194,11 +194,10 @@ gst_ffmpegdec_dispose (GObject *object) { GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object; - /* close old session */ - if (ffmpegdec->opened) { - avcodec_close (ffmpegdec->context); - ffmpegdec->opened = FALSE; - } + + G_OBJECT_CLASS (parent_class)->dispose (object); + /* old session should have been closed in element_class->dispose */ + g_assert (!ffmpegdec->opened); /* clean up remaining allocated data */ av_free (ffmpegdec->context); |