From 897f7039f8309afc8963cf8480f39de89e4d4c0f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 16 May 2007 19:15:13 +0000 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ gst/realmedia/rmdemux.c | 13 ++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) 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: -- 2.7.4