mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 10:41:04 +00:00
mpeg4: handle skipped frames (vop_hdr->coded = 0).
Gracefully skip non VOP coded frames. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
parent
1632b40982
commit
96437a7a16
1 changed files with 5 additions and 1 deletions
|
@ -496,6 +496,9 @@ decode_picture(GstVaapiDecoderMpeg4 *decoder, const guint8 *buf, guint buf_size)
|
|||
}
|
||||
else {
|
||||
parser_result = gst_mpeg4_parse_video_object_plane(vop_hdr, sprite_trajectory, vol_hdr, buf, buf_size);
|
||||
/* Need to skip this frame if VOP was not coded */
|
||||
if (GST_MPEG4_PARSER_OK == parser_result && !vop_hdr->coded)
|
||||
return GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA;
|
||||
}
|
||||
|
||||
if (parser_result != GST_MPEG4_PARSER_OK) {
|
||||
|
@ -964,7 +967,8 @@ decode_buffer(GstVaapiDecoderMpeg4 *decoder, GstBuffer *buffer)
|
|||
break;
|
||||
}
|
||||
status = decode_packet(decoder, packet);
|
||||
if (GST_VAAPI_DECODER_STATUS_SUCCESS == status) {
|
||||
if (GST_VAAPI_DECODER_STATUS_SUCCESS == status ||
|
||||
GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA == status) {
|
||||
consumed_size = packet.offset + packet.size - pos;
|
||||
pos = packet.offset + packet.size;
|
||||
if (gst_adapter_available(priv->adapter) >= pos)
|
||||
|
|
Loading…
Reference in a new issue