mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
avauddec: Stop using AVCODEC_MAX_AUDIO_FRAME_SIZE
And properly use the have_data variable. It's a boolean.
This commit is contained in:
parent
28d1c135bb
commit
8fc3da62c1
1 changed files with 4 additions and 3 deletions
|
@ -461,7 +461,7 @@ gst_ffmpegauddec_audio_frame (GstFFMpegAudDec * ffmpegdec,
|
|||
GstBuffer ** outbuf, GstFlowReturn * ret)
|
||||
{
|
||||
gint len = -1;
|
||||
gint have_data = AVCODEC_MAX_AUDIO_FRAME_SIZE;
|
||||
gint have_data = 0;
|
||||
AVPacket packet;
|
||||
AVFrame frame;
|
||||
|
||||
|
@ -475,7 +475,7 @@ gst_ffmpegauddec_audio_frame (GstFFMpegAudDec * ffmpegdec,
|
|||
GST_DEBUG_OBJECT (ffmpegdec,
|
||||
"Decode audio: len=%d, have_data=%d", len, have_data);
|
||||
|
||||
if (len >= 0 && have_data > 0) {
|
||||
if (len >= 0 && have_data) {
|
||||
BufferInfo *buffer_info = frame.opaque;
|
||||
gint nsamples, channels, byte_per_sample;
|
||||
gsize output_size;
|
||||
|
@ -569,7 +569,8 @@ gst_ffmpegauddec_audio_frame (GstFFMpegAudDec * ffmpegdec,
|
|||
gst_buffer_fill (*outbuf, 0, frame.data[0], output_size);
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (ffmpegdec, "Buffer created. Size: %d", have_data);
|
||||
GST_DEBUG_OBJECT (ffmpegdec, "Buffer created. Size: %" G_GSIZE_FORMAT,
|
||||
output_size);
|
||||
|
||||
/* Reorder channels to the GStreamer channel order */
|
||||
if (ffmpegdec->needs_reorder) {
|
||||
|
|
Loading…
Reference in a new issue