mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
codecparser: Make warnings more meaningful
By stating whether we don't have enough data or it's a corrupted packet
This commit is contained in:
parent
dbe350d380
commit
3b6825a546
1 changed files with 8 additions and 2 deletions
|
@ -849,7 +849,7 @@ gst_mpeg_video_packet_parse_picture_header (const GstMpegVideoPacket * packet,
|
|||
|
||||
|
||||
if (hdr->pic_type == 0 || hdr->pic_type > 4)
|
||||
goto failed; /* Corrupted picture packet */
|
||||
goto bad_pic_type; /* Corrupted picture packet */
|
||||
|
||||
/* skip VBV delay */
|
||||
if (!gst_bit_reader_skip (&br, 16))
|
||||
|
@ -879,9 +879,15 @@ gst_mpeg_video_packet_parse_picture_header (const GstMpegVideoPacket * packet,
|
|||
|
||||
return TRUE;
|
||||
|
||||
bad_pic_type:
|
||||
{
|
||||
GST_WARNING ("Unsupported picture type : %d", hdr->pic_type);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
failed:
|
||||
{
|
||||
GST_WARNING ("Failed to parse picture header");
|
||||
GST_WARNING ("Not enough data to parse picture header");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue