mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
avviddec: Don't copy padding if handling a frame failed
We will return an error right afterwards anyway.
This commit is contained in:
parent
099ea5f2d1
commit
4459d706c8
1 changed files with 5 additions and 5 deletions
|
@ -1540,18 +1540,18 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder,
|
||||||
len =
|
len =
|
||||||
gst_ffmpegviddec_frame (ffmpegdec, data, size, &have_data, frame, &ret);
|
gst_ffmpegviddec_frame (ffmpegdec, data, size, &have_data, frame, &ret);
|
||||||
|
|
||||||
if (do_padding) {
|
|
||||||
memcpy (data + size, tmp_padding, FF_INPUT_BUFFER_PADDING_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret != GST_FLOW_OK) {
|
if (ret != GST_FLOW_OK) {
|
||||||
GST_LOG_OBJECT (ffmpegdec, "breaking because of flow ret %s",
|
GST_LOG_OBJECT (ffmpegdec, "breaking because of flow ret %s",
|
||||||
gst_flow_get_name (ret));
|
gst_flow_get_name (ret));
|
||||||
/* bad flow retun, make sure we discard all data and exit */
|
/* bad flow return, make sure we discard all data and exit */
|
||||||
bsize = 0;
|
bsize = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (do_padding) {
|
||||||
|
memcpy (data + size, tmp_padding, FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
if (len == 0 && have_data == 0) {
|
if (len == 0 && have_data == 0) {
|
||||||
/* nothing was decoded, this could be because no data was available or
|
/* nothing was decoded, this could be because no data was available or
|
||||||
* because we were skipping frames.
|
* because we were skipping frames.
|
||||||
|
|
Loading…
Reference in a new issue