diff options
author | dolphy <dolphy@2b0047a9-a6d8-0310-accf-f7200b2a168c> | 2014-02-24 11:48:51 +0000 |
---|---|---|
committer | dolphy <dolphy@2b0047a9-a6d8-0310-accf-f7200b2a168c> | 2014-02-24 11:48:51 +0000 |
commit | f48cfc8d4799b2fd7e0b22556d03cc1f46560874 (patch) | |
tree | e09121b7ce31b4bcc1d732f04ec4bc838bb9218e | |
parent | 82a525a22d0389c44ad9983258d82f607b65ff93 (diff) |
2014-02-24 Julien Moutte <julien@fluendo.com>
* src/flump3dec-0_10.c: Make sure we provide the incoming timestamp
to the decoding function. This fixes some A/V sync issues where the
MP3 decoder was ignoring incoming timestamps and generating a perfectly
continuous stream.
git-svn-id: https://core.fluendo.com/gstreamer/svn/trunk/gst-fluendo-mp3@2578 2b0047a9-a6d8-0310-accf-f7200b2a168c
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/flump3dec-0_10.c | 12 |
2 files changed, 13 insertions, 6 deletions
@@ -1,3 +1,10 @@ +2014-02-24 Julien Moutte <julien@fluendo.com> + + * src/flump3dec-0_10.c: Make sure we provide the incoming timestamp + to the decoding function. This fixes some A/V sync issues where the + MP3 decoder was ignoring incoming timestamps and generating a perfectly + continuous stream. + 2014-01-31 Andoni Morales <amorales@fluendo.com> * src/mp3-c-synth.c: diff --git a/src/flump3dec-0_10.c b/src/flump3dec-0_10.c index 410dbed..7631786 100644 --- a/src/flump3dec-0_10.c +++ b/src/flump3dec-0_10.c @@ -268,13 +268,13 @@ gst_flump3dec_flush (GstFluMp3Dec * dec) } static GstFlowReturn -gst_flump3dec_decode (GstFluMp3Dec * dec, gboolean more_data) +gst_flump3dec_decode (GstFluMp3Dec * dec, GstClockTime dec_ts, + gboolean more_data) { Mp3TlRetcode result; const fr_header *mp3hdr = NULL; GstBuffer *out_buf = NULL; GstFlowReturn res = GST_FLOW_OK; - GstClockTime dec_ts = GST_CLOCK_TIME_NONE; GstTagList *taglist = NULL; guint8 *out_data; gsize out_size; @@ -551,7 +551,7 @@ gst_flump3dec_sink_chain (GstPad * pad, GstBuffer * buffer) } else { /* We flush on disconts */ GST_DEBUG_OBJECT (dec, "this buffer has a DISCONT flag, flushing"); - gst_flump3dec_decode (dec, FALSE); + gst_flump3dec_decode (dec, GST_CLOCK_TIME_NONE, FALSE); gst_flump3dec_flush (dec); } } @@ -567,7 +567,7 @@ gst_flump3dec_sink_chain (GstPad * pad, GstBuffer * buffer) bs_set_data (dec->bs, data, avail); - res = gst_flump3dec_decode (dec, TRUE); + res = gst_flump3dec_decode (dec, new_ts, TRUE); if (GST_CLOCK_TIME_IS_VALID (new_ts) && GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DURATION (buffer))) @@ -606,7 +606,7 @@ gst_flump3dec_sink_event (GstPad * pad, GstEvent * event) G_GINT64_FORMAT, format, base, start, end); if (!update) - gst_flump3dec_decode (dec, FALSE); + gst_flump3dec_decode (dec, GST_CLOCK_TIME_NONE, FALSE); if (format == GST_FORMAT_BYTES) { GstClockTime disc_start, disc_end, disc_base; @@ -642,7 +642,7 @@ gst_flump3dec_sink_event (GstPad * pad, GstEvent * event) break; case GST_EVENT_EOS: /* Output any remaining frames */ - gst_flump3dec_decode (dec, FALSE); + gst_flump3dec_decode (dec, GST_CLOCK_TIME_NONE, FALSE); break; default: break; |