summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 155339b)
raw | patch | inline | side by side (parent: 155339b)
author | Thomas Vander Stichele <thomas@apestaart.org> | |
Sat, 30 Dec 2006 20:01:35 +0000 (20:01 +0000) | ||
committer | Thomas Vander Stichele <thomas@apestaart.org> | |
Sat, 30 Dec 2006 20:01:35 +0000 (20:01 +0000) |
Original commit message from CVS:
* ext/lame/gstlame.c: (gst_lame_sink_setcaps), (gst_lame_chain):
warn when outgoing sample rate is different from incoming
* ext/lame/gstlame.c: (gst_lame_sink_setcaps), (gst_lame_chain):
warn when outgoing sample rate is different from incoming
ChangeLog | patch | blob | history | |
ext/lame/gstlame.c | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index bc41c0bcc7cd18694335cbeb834261f2cb928028..6b16ddf30bc26c25aa2a535518c96c447b0abceb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2006-12-30 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * ext/lame/gstlame.c: (gst_lame_sink_setcaps), (gst_lame_chain):
+ warn when outgoing sample rate is different from incoming
+
2006-12-29 Jan Schmidt <thaytan@mad.scientist.com>
* gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_chain):
diff --git a/ext/lame/gstlame.c b/ext/lame/gstlame.c
index 7e7d27fa9b5a3fde147bb67aa12397f42842cad5..92f8bef6c26887c96988008e4a8d279878f124e4 100644 (file)
--- a/ext/lame/gstlame.c
+++ b/ext/lame/gstlame.c
out_samplerate = lame_get_out_samplerate (lame->lgf);
if (out_samplerate == 0)
goto zero_output_rate;
+ if (out_samplerate != lame->samplerate) {
+ GST_WARNING_OBJECT (lame,
+ "output samplerate %d is different from incoming samplerate %d",
+ out_samplerate, lame->samplerate);
+ }
othercaps =
gst_caps_new_simple ("audio/mpeg",
}
GST_LOG_OBJECT (lame, "encoded %d bytes of audio to %d bytes of mp3",
- GST_BUFFER_SIZE (buf), mp3_size);
+ size, mp3_size);
duration = gst_util_uint64_scale_int (size, GST_SECOND,
2 * lame->samplerate * lame->num_channels);
if (GST_BUFFER_DURATION (buf) != GST_CLOCK_TIME_NONE &&
GST_BUFFER_DURATION (buf) != duration) {
GST_DEBUG_OBJECT (lame, "incoming buffer had incorrect duration %"
- GST_TIME_FORMAT "outgoing buffer will have correct duration %"
+ GST_TIME_FORMAT ", outgoing buffer will have correct duration %"
GST_TIME_FORMAT,
GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_TIME_ARGS (duration));
}