mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-07 15:02:40 +00:00
avviddec: If a flow return during draining is not OK, don't drain any further
This commit is contained in:
parent
af91ba1620
commit
099ea5f2d1
1 changed files with 2 additions and 4 deletions
|
@ -1460,16 +1460,14 @@ gst_ffmpegviddec_drain (GstFFMpegVidDec * ffmpegdec)
|
||||||
|
|
||||||
if (oclass->in_plugin->capabilities & CODEC_CAP_DELAY) {
|
if (oclass->in_plugin->capabilities & CODEC_CAP_DELAY) {
|
||||||
gint have_data, len;
|
gint have_data, len;
|
||||||
|
GstFlowReturn ret;
|
||||||
|
|
||||||
GST_LOG_OBJECT (ffmpegdec,
|
GST_LOG_OBJECT (ffmpegdec,
|
||||||
"codec has delay capabilities, calling until ffmpeg has drained everything");
|
"codec has delay capabilities, calling until ffmpeg has drained everything");
|
||||||
|
|
||||||
do {
|
do {
|
||||||
GstFlowReturn ret;
|
|
||||||
|
|
||||||
len = gst_ffmpegviddec_frame (ffmpegdec, NULL, 0, &have_data, NULL, &ret);
|
len = gst_ffmpegviddec_frame (ffmpegdec, NULL, 0, &have_data, NULL, &ret);
|
||||||
|
} while (len >= 0 && have_data == 1 && ret == GST_FLOW_OK);
|
||||||
} while (len >= 0 && have_data == 1);
|
|
||||||
avcodec_flush_buffers (ffmpegdec->context);
|
avcodec_flush_buffers (ffmpegdec->context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue