androidmedia: Don't consider input buffer queueing failures as an error during flushing

This commit is contained in:
Sebastian Dröge 2014-06-19 11:15:56 +02:00
parent 71c0e0e19f
commit 880f3d8a18
3 changed files with 18 additions and 3 deletions

View file

@ -1134,9 +1134,14 @@ gst_amc_audio_dec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
idx, buffer_info.size, buffer_info.presentation_time_us,
buffer_info.flags);
if (!gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info,
&err))
&err)) {
if (self->flushing) {
g_clear_error (&err);
goto flushing;
}
goto queue_error;
}
}
gst_buffer_unmap (inbuf, &minfo);
gst_buffer_unref (inbuf);

View file

@ -1243,9 +1243,14 @@ gst_amc_video_dec_handle_frame (GstVideoDecoder * decoder,
idx, buffer_info.size, buffer_info.presentation_time_us,
buffer_info.flags);
if (!gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info,
&err))
&err)) {
if (self->flushing) {
g_clear_error (&err);
goto flushing;
}
goto queue_error;
}
}
gst_buffer_unmap (frame->input_buffer, &minfo);
gst_video_codec_frame_unref (frame);

View file

@ -1524,8 +1524,13 @@ again:
"Queueing buffer %d: size %d time %" G_GINT64_FORMAT " flags 0x%08x",
idx, buffer_info.size, buffer_info.presentation_time_us,
buffer_info.flags);
if (!gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, &err))
if (!gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, &err)) {
if (self->flushing) {
g_clear_error (&err);
goto flushing;
}
goto queue_error;
}
gst_video_codec_frame_unref (frame);