From: Tim-Philipp Müller Date: Wed, 16 May 2007 19:15:13 +0000 (+0000) Subject: gst/realmedia/rmdemux.c: After descrambling, push the packets out as individual packe... X-Git-Tag: 1.19.3~505^2~1762 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=897f7039f8309afc8963cf8480f39de89e4d4c0f;p=platform%2Fupstream%2Fgstreamer.git gst/realmedia/rmdemux.c: After descrambling, push the packets out as individual packets instead of one big descramble... Original commit message from CVS: * gst/realmedia/rmdemux.c: (gst_rmdemux_descramble_cook_audio): After descrambling, push the packets out as individual packets instead of one big descrambled buffer. Makes cook audio decoding work with the 'realaudiodec' decoder from gst-plugins-bad. --- diff --git a/ChangeLog b/ChangeLog index c3c5dbc..a721b4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-05-16 Tim-Philipp Müller + * gst/realmedia/rmdemux.c: (gst_rmdemux_descramble_cook_audio): + After descrambling, push the packets out as individual packets + instead of one big descrambled buffer. Makes cook audio decoding + work with the 'realaudiodec' decoder from gst-plugins-bad. + +2007-05-16 Tim-Philipp Müller + * gst/realmedia/rmdemux.c: (gst_rmdemux_init), (gst_rmdemux_sink_event), (gst_rmdemux_perform_seek), (gst_rmdemux_reset), (gst_rmdemux_chain), (gst_rmdemux_add_stream), diff --git a/gst/realmedia/rmdemux.c b/gst/realmedia/rmdemux.c index d8bf56f..6f8944b 100644 --- a/gst/realmedia/rmdemux.c +++ b/gst/realmedia/rmdemux.c @@ -1876,7 +1876,18 @@ gst_rmdemux_descramble_cook_audio (GstRMDemux * rmdemux, } } - ret = gst_pad_push (stream->pad, outbuf); + /* some decoders, such as realaudiodec, need to be fed in packet units */ + for (p = 0; p < height; ++p) { + GstBuffer *subbuf; + + subbuf = gst_buffer_create_sub (outbuf, p * packet_size, packet_size); + gst_buffer_set_caps (subbuf, GST_PAD_CAPS (stream->pad)); + ret = gst_pad_push (stream->pad, subbuf); + if (ret != GST_FLOW_OK) + break; + } + + gst_buffer_unref (outbuf); done: