It's taken from upstream as well as other patches. See: http://cgit.freedesktop.org/gstreamer/gst-ffmpeg/commit/?h=1.0&id=a3b0ae22d76522d0a79f5d946872c0260dd1e3b2
Also ignore decode errors for AAC and carry on decoding like we do for all other formats. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=679639 -- WBR, Vadim Zhukov 2013/3/25 Antoine Jacoutot <[email protected]>: > On Mon, Mar 25, 2013 at 07:52:23PM +0400, Vadim Zhukov wrote: >> This fixes playing AAC streams for me. Okay? > > Care to share some explanation: you are removing a block that looks > legitimate at first glance. > > >> -- >> WBR, >> Vadim Zhukov >> >> >> Index: Makefile >> =================================================================== >> RCS file: /cvs/ports/multimedia/gstreamer-0.10/plugins-ffmpeg/Makefile,v >> retrieving revision 1.32 >> diff -u -p -r1.32 Makefile >> --- Makefile 25 Mar 2013 12:31:58 -0000 1.32 >> +++ Makefile 25 Mar 2013 15:50:17 -0000 >> @@ -5,7 +5,7 @@ COMMENT= ffmpeg element for GStreamer >> V= 0.10.13 >> DISTNAME= gst-ffmpeg-${V} >> PKGNAME= gstreamer-ffmpeg-${V} >> -REVISION= 5 >> +REVISION= 6 >> >> # sync with graphics/ffmpeg >> PERMIT_PACKAGE_CDROM= patents >> Index: patches/patch-ext_ffmpeg_gstffmpegdec_c >> =================================================================== >> RCS file: >> /cvs/ports/multimedia/gstreamer-0.10/plugins-ffmpeg/patches/patch-ext_ffmpeg_gstffmpegdec_c,v >> retrieving revision 1.4 >> diff -u -p -r1.4 patch-ext_ffmpeg_gstffmpegdec_c >> --- patches/patch-ext_ffmpeg_gstffmpegdec_c 3 Mar 2012 10:33:42 -0000 >> 1.4 >> +++ patches/patch-ext_ffmpeg_gstffmpegdec_c 25 Mar 2013 15:50:17 -0000 >> @@ -5,6 +5,7 @@ From upstream: >> - Give the (E)AC3/DTS decoders a rank of marginal. >> - Only set get_buffer() function for video. >> - Only slice-threading. >> +- Ignore AAC errors. >> >> --- ext/ffmpeg/gstffmpegdec.c.orig Wed Nov 2 09:04:05 2011 >> +++ ext/ffmpeg/gstffmpegdec.c Fri Mar 2 17:23:48 2012 >> @@ -120,7 +121,23 @@ From upstream: >> GST_DEBUG_OBJECT (ffmpegdec, >> "Buffer interlacing does not match pad, updating"); >> buffer = gst_buffer_make_metadata_writable (buffer); >> -@@ -3043,14 +3058,6 @@ gst_ffmpegdec_register (GstPlugin * plugin) >> +@@ -2205,15 +2205,6 @@ gst_ffmpegdec_audio_frame (GstFFMpegDec * ffmpegdec, >> + *outbuf = NULL; >> + } >> + >> +- /* If we don't error out after the first failed read with the AAC >> decoder, >> +- * we must *not* carry on pushing data, else we'll cause segfaults... */ >> +- if (len == -1 && (in_plugin->id == CODEC_ID_AAC >> +- || in_plugin->id == CODEC_ID_AAC_LATM)) { >> +- GST_ELEMENT_ERROR (ffmpegdec, STREAM, DECODE, (NULL), >> +- ("Decoding of AAC stream by FFMPEG failed.")); >> +- *ret = GST_FLOW_ERROR; >> +- } >> +- >> + beach: >> + GST_DEBUG_OBJECT (ffmpegdec, "return flow %d, out %p, len %d", >> + *ret, *outbuf, len); >> +@@ -3043,14 +3049,6 @@ gst_ffmpegdec_register (GstPlugin * plugin) >> rank = GST_RANK_SECONDARY; >> break; >> case CODEC_ID_MP3: > > -- > Antoine
