mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
twolame: improve output framing and timestamping
... which simply comes down to requesting one frame of input data at a time, since the encoder nicely turns this into 1 encoded frame.
This commit is contained in:
parent
8f58c2cbab
commit
f2011f15f1
1 changed files with 6 additions and 2 deletions
|
@ -401,8 +401,12 @@ gst_two_lame_set_format (GstAudioEncoder * enc, GstAudioInfo * info)
|
|||
gst_pad_set_caps (GST_AUDIO_ENCODER_SRC_PAD (twolame), othercaps);
|
||||
gst_caps_unref (othercaps);
|
||||
|
||||
/* not much base class feedback:
|
||||
* - we will handle buffers, just hand us all available */
|
||||
/* report needs to base class:
|
||||
* hand one frame at a time, if we are pretty sure what a frame is */
|
||||
if (out_samplerate == twolame->samplerate) {
|
||||
gst_audio_encoder_set_frame_samples (enc, 1152);
|
||||
gst_audio_encoder_set_frame_max (enc, 1);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue