mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
avauddec: Finish frames if they are header buffers only and don't produce any output
Otherwise we will consider them as one frame of raw audio that is still pending, and shift all timestamps by the amount of time spent with header buffers. https://bugzilla.gnome.org/show_bug.cgi?id=765797
This commit is contained in:
parent
00ebf95e08
commit
3fb49b6053
1 changed files with 3 additions and 2 deletions
|
@ -702,7 +702,7 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
|
|||
GstMapInfo map;
|
||||
gint size, bsize, len, have_data;
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
gboolean do_padding;
|
||||
gboolean do_padding, is_header;
|
||||
|
||||
ffmpegdec = (GstFFMpegAudDec *) decoder;
|
||||
|
||||
|
@ -715,6 +715,7 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
|
|||
}
|
||||
|
||||
inbuf = gst_buffer_ref (inbuf);
|
||||
is_header = GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_HEADER);
|
||||
|
||||
oclass = (GstFFMpegAudDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
|
||||
|
||||
|
@ -819,7 +820,7 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
|
|||
ret =
|
||||
gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (ffmpegdec),
|
||||
ffmpegdec->outbuf, 1);
|
||||
else if (len < 0)
|
||||
else if (len < 0 || is_header)
|
||||
ret =
|
||||
gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (ffmpegdec), NULL, 1);
|
||||
ffmpegdec->outbuf = NULL;
|
||||
|
|
Loading…
Reference in a new issue