mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
Always pass 1 as number of frames to finish_frame()
This commit is contained in:
parent
99e287b86b
commit
bb8e53d4b8
2 changed files with 5 additions and 6 deletions
|
@ -570,7 +570,6 @@ retry:
|
|||
if (buffer_info.size > 0) {
|
||||
GstBuffer *outbuf;
|
||||
GstAmcBuffer *buf;
|
||||
gint nframes;
|
||||
|
||||
/* This sometimes happens at EOS or if the input is not properly framed,
|
||||
* let's handle it gracefully by allocating a new buffer for the current
|
||||
|
@ -589,11 +588,11 @@ retry:
|
|||
|
||||
GST_BUFFER_TIMESTAMP (outbuf) =
|
||||
gst_util_uint64_scale (buffer_info.presentation_time_us, GST_USECOND,
|
||||
GST_SECOND);
|
||||
nframes = buffer_info.size / (self->channels * 2);
|
||||
1);
|
||||
|
||||
/* FIXME: Assuming we get a single frame per output buffer */
|
||||
flow_ret =
|
||||
gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (self), outbuf,
|
||||
nframes);
|
||||
gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (self), outbuf, 1);
|
||||
}
|
||||
|
||||
if (is_eos || flow_ret == GST_FLOW_UNEXPECTED) {
|
||||
|
|
|
@ -984,7 +984,7 @@ retry:
|
|||
|
||||
GST_BUFFER_TIMESTAMP (outbuf) =
|
||||
gst_util_uint64_scale (buffer_info.presentation_time_us, GST_USECOND,
|
||||
GST_SECOND);
|
||||
1);
|
||||
flow_ret = gst_pad_push (GST_VIDEO_DECODER_SRC_PAD (self), outbuf);
|
||||
} else if (buffer_info.size > 0) {
|
||||
if ((flow_ret = gst_video_decoder_alloc_output_frame (GST_VIDEO_DECODER
|
||||
|
|
Loading…
Reference in a new issue