mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-21 05:26:23 +00:00
ffmpegenc: Pass the size of the output buffer to avcodec_encode_audio
avcodec_encode_audio is documented as taking the size of the output buffer not the size of the input buffer. This fixes the use of the G722 encoder and makes the code more consistent with avconv from the libav source tree.
This commit is contained in:
parent
d5e4fc3bbb
commit
dc80daec38
1 changed files with 1 additions and 1 deletions
|
@ -864,7 +864,7 @@ gst_ffmpegenc_encode_audio (GstFFMpegEnc * ffmpegenc, guint8 * audio_in,
|
|||
if (ffmpegenc->buffer_size != max_size)
|
||||
ffmpegenc->buffer_size = max_size;
|
||||
|
||||
res = avcodec_encode_audio (ctx, audio_out, in_size, (short *) audio_in);
|
||||
res = avcodec_encode_audio (ctx, audio_out, max_size, (short *) audio_in);
|
||||
|
||||
if (res < 0) {
|
||||
GST_ERROR_OBJECT (ffmpegenc, "Failed to encode buffer: %d", res);
|
||||
|
|
Loading…
Reference in a new issue