mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
theoradec: handle empty adapter
Should not be empty but might be when we actually pass and decode the 0 packets later.
This commit is contained in:
parent
da673880eb
commit
f15bc6835b
1 changed files with 7 additions and 5 deletions
|
@ -273,11 +273,13 @@ theora_dec_parse (GstVideoDecoder * decoder,
|
||||||
|
|
||||||
av = gst_adapter_available (adapter);
|
av = gst_adapter_available (adapter);
|
||||||
|
|
||||||
data = gst_adapter_map (adapter, 1);
|
if (av > 0) {
|
||||||
/* check for keyframe; must not be header packet */
|
data = gst_adapter_map (adapter, 1);
|
||||||
if (!(data[0] & 0x80) && (data[0] & 0x40) == 0)
|
/* check for keyframe; must not be header packet */
|
||||||
GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
|
if (!(data[0] & 0x80) && (data[0] & 0x40) == 0)
|
||||||
gst_adapter_unmap (adapter);
|
GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
|
||||||
|
gst_adapter_unmap (adapter);
|
||||||
|
}
|
||||||
|
|
||||||
/* and pass along all */
|
/* and pass along all */
|
||||||
gst_video_decoder_add_to_frame (decoder, av);
|
gst_video_decoder_add_to_frame (decoder, av);
|
||||||
|
|
Loading…
Reference in a new issue