Always pass 1 as number of frames to finish_frame()
This commit is contained in:
parent
99e287b86b
commit
bb8e53d4b8
@ -570,7 +570,6 @@ retry:
|
|||||||
if (buffer_info.size > 0) {
|
if (buffer_info.size > 0) {
|
||||||
GstBuffer *outbuf;
|
GstBuffer *outbuf;
|
||||||
GstAmcBuffer *buf;
|
GstAmcBuffer *buf;
|
||||||
gint nframes;
|
|
||||||
|
|
||||||
/* This sometimes happens at EOS or if the input is not properly framed,
|
/* 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
|
* let's handle it gracefully by allocating a new buffer for the current
|
||||||
@ -589,11 +588,11 @@ retry:
|
|||||||
|
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) =
|
GST_BUFFER_TIMESTAMP (outbuf) =
|
||||||
gst_util_uint64_scale (buffer_info.presentation_time_us, GST_USECOND,
|
gst_util_uint64_scale (buffer_info.presentation_time_us, GST_USECOND,
|
||||||
GST_SECOND);
|
1);
|
||||||
nframes = buffer_info.size / (self->channels * 2);
|
|
||||||
|
/* FIXME: Assuming we get a single frame per output buffer */
|
||||||
flow_ret =
|
flow_ret =
|
||||||
gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (self), outbuf,
|
gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (self), outbuf, 1);
|
||||||
nframes);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_eos || flow_ret == GST_FLOW_UNEXPECTED) {
|
if (is_eos || flow_ret == GST_FLOW_UNEXPECTED) {
|
||||||
|
@ -984,7 +984,7 @@ retry:
|
|||||||
|
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) =
|
GST_BUFFER_TIMESTAMP (outbuf) =
|
||||||
gst_util_uint64_scale (buffer_info.presentation_time_us, GST_USECOND,
|
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);
|
flow_ret = gst_pad_push (GST_VIDEO_DECODER_SRC_PAD (self), outbuf);
|
||||||
} else if (buffer_info.size > 0) {
|
} else if (buffer_info.size > 0) {
|
||||||
if ((flow_ret = gst_video_decoder_alloc_output_frame (GST_VIDEO_DECODER
|
if ((flow_ret = gst_video_decoder_alloc_output_frame (GST_VIDEO_DECODER
|
||||||
|
Loading…
x
Reference in New Issue
Block a user