mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-25 07:26:29 +00:00
ext/lame/gstlame.c: simplify
Original commit message from CVS: * ext/lame/gstlame.c: (gst_lame_chain): simplify * ext/mad/gstmad.c: (gst_mad_handle_event): fix event leak * gst/typefind/gsttypefindfunctions.c: (mp3_type_find): be able to detect mp3 files < 4096 bytes
This commit is contained in:
parent
6feb686331
commit
c1ff34505b
3 changed files with 15 additions and 12 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,12 @@
|
||||||
|
2004-05-05 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||||
|
|
||||||
|
* ext/lame/gstlame.c: (gst_lame_chain):
|
||||||
|
simplify
|
||||||
|
* ext/mad/gstmad.c: (gst_mad_handle_event):
|
||||||
|
fix event leak
|
||||||
|
* gst/typefind/gsttypefindfunctions.c: (mp3_type_find):
|
||||||
|
be able to detect mp3 files < 4096 bytes
|
||||||
|
|
||||||
2004-05-06 Wim Taymans <wim@fluendo.com>
|
2004-05-06 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* ext/theora/theoraenc.c: (gst_theora_enc_class_init),
|
* ext/theora/theoraenc.c: (gst_theora_enc_class_init),
|
||||||
|
@ -102,6 +111,7 @@
|
||||||
* ext/lame/gstlame.c:
|
* ext/lame/gstlame.c:
|
||||||
correct defaults that lame_init puts out of range
|
correct defaults that lame_init puts out of range
|
||||||
|
|
||||||
|
>>>>>>> 1.601
|
||||||
2004-05-03 Thomas Vander Stichele <thomas at apestaart dot org>
|
2004-05-03 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* ext/divx/gstdivxenc.c: (gst_divxenc_get_type),
|
* ext/divx/gstdivxenc.c: (gst_divxenc_get_type),
|
||||||
|
|
|
@ -797,16 +797,10 @@ gst_lame_chain (GstPad * pad, GstData * _data)
|
||||||
((GST_BUFFER_SIZE (buf) / (2 + lame->num_channels)) * 1.25) + 7200;
|
((GST_BUFFER_SIZE (buf) / (2 + lame->num_channels)) * 1.25) + 7200;
|
||||||
mp3_data = g_malloc (mp3_buffer_size);
|
mp3_data = g_malloc (mp3_buffer_size);
|
||||||
|
|
||||||
if (lame->num_channels == 2) {
|
mp3_size = lame_encode_buffer_interleaved (lame->lgf,
|
||||||
mp3_size = lame_encode_buffer_interleaved (lame->lgf,
|
(short int *) (GST_BUFFER_DATA (buf)),
|
||||||
(short int *) (GST_BUFFER_DATA (buf)),
|
GST_BUFFER_SIZE (buf) / 2 / lame->num_channels,
|
||||||
GST_BUFFER_SIZE (buf) / 4, mp3_data, mp3_buffer_size);
|
mp3_data, mp3_buffer_size);
|
||||||
} else {
|
|
||||||
mp3_size = lame_encode_buffer (lame->lgf,
|
|
||||||
(short int *) (GST_BUFFER_DATA (buf)),
|
|
||||||
(short int *) (GST_BUFFER_DATA (buf)),
|
|
||||||
GST_BUFFER_SIZE (buf) / 2, mp3_data, mp3_buffer_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
GST_DEBUG ("encoded %d bytes of audio to %d bytes of mp3",
|
GST_DEBUG ("encoded %d bytes of audio to %d bytes of mp3",
|
||||||
GST_BUFFER_SIZE (buf), mp3_size);
|
GST_BUFFER_SIZE (buf), mp3_size);
|
||||||
|
|
|
@ -923,8 +923,6 @@ gst_mad_handle_event (GstPad * pad, GstBuffer * buffer)
|
||||||
mad->total_samples = 0;
|
mad->total_samples = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_event_unref (event);
|
|
||||||
|
|
||||||
if (GST_PAD_IS_USABLE (mad->srcpad)) {
|
if (GST_PAD_IS_USABLE (mad->srcpad)) {
|
||||||
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME,
|
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME,
|
||||||
time, NULL);
|
time, NULL);
|
||||||
|
@ -936,6 +934,7 @@ gst_mad_handle_event (GstPad * pad, GstBuffer * buffer)
|
||||||
mad->tempsize = 0;
|
mad->tempsize = 0;
|
||||||
/* we don't need to restart when we get here */
|
/* we don't need to restart when we get here */
|
||||||
mad->restart = FALSE;
|
mad->restart = FALSE;
|
||||||
|
gst_event_unref (event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GST_EVENT_EOS:
|
case GST_EVENT_EOS:
|
||||||
|
|
Loading…
Reference in a new issue