summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArwed v. Merkatz <v.merkatz@gmx.net>2004-12-06 19:32:33 +0000
committerArwed v. Merkatz <v.merkatz@gmx.net>2004-12-06 19:32:33 +0000
commitdb9e3b6d92a9b426867e97e5e987a491f29cb798 (patch)
tree6a7721f6e44b0bc82565b45006448fbcff8b174a
parentab8e71c93e471afb4d0ab7dc3743a439a959f9e0 (diff)
downloadgst-plugins-bad-db9e3b6d92a9b426867e97e5e987a491f29cb798.tar.gz
gst-plugins-bad-db9e3b6d92a9b426867e97e5e987a491f29cb798.tar.bz2
gst-plugins-bad-db9e3b6d92a9b426867e97e5e987a491f29cb798.zip
set correct buffer durations in mp3parse, set default_duration in matroskamux for mpeg1 audio
Original commit message from CVS: set correct buffer durations in mp3parse, set default_duration in matroskamux for mpeg1 audio
-rw-r--r--ChangeLog7
-rw-r--r--gst/mpegaudioparse/gstmpegaudioparse.c8
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d04f64d3..12c053a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-12-06 Arwed v. Merkatz <v.merkatz@gmx.net>
+
+ * gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_chain):
+ set BUFFER_DURATION to correct values (mpeg1 audio frame length is fixed)
+ * gst/matroska/matroska-mux.c: (gst_matroska_mux_audio_pad_link):
+ set default_duration for mpeg1 audio
+
2004-12-06 Benjamin Otte <in7y118@public.uni-hamburg.de>
* ext/alsa/gstalsa.c: (gst_alsa_get_caps), (gst_alsa_close_audio):
diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c
index 98fce11c..8e77acac 100644
--- a/gst/mpegaudioparse/gstmpegaudioparse.c
+++ b/gst/mpegaudioparse/gstmpegaudioparse.c
@@ -417,9 +417,11 @@ gst_mp3parse_chain (GstPad * pad, GstData * _data)
mp3parse->in_flush = FALSE;
}
GST_BUFFER_TIMESTAMP (outbuf) = last_ts;
- GST_BUFFER_DURATION (outbuf) =
- 8 * (GST_SECOND / 1000) * GST_BUFFER_SIZE (outbuf) /
- mp3parse->bit_rate;
+ if (mp3parse->layer == 1) {
+ GST_BUFFER_DURATION (outbuf) = 384 * GST_SECOND / mp3parse->rate;
+ } else {
+ GST_BUFFER_DURATION (outbuf) = 1152 * GST_SECOND / mp3parse->rate;
+ }
if (GST_PAD_CAPS (mp3parse->srcpad) != NULL) {
gst_pad_push (mp3parse->srcpad, GST_DATA (outbuf));