mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
h263parse: Fix PSC matching
We were off by one byte in the matching It should be (using 24 bit matching): * startcode : 0000 0000 0000 0000 1000 00xx * mask (bin) : 1111 1111 1111 1111 1111 1100 * mask (hex) : f f f f f c * match : 0 0 0 0 8 0 https://bugzilla.gnome.org/show_bug.cgi?id=750685
This commit is contained in:
parent
29c79d7595
commit
898b436219
1 changed files with 7 additions and 2 deletions
|
@ -169,10 +169,15 @@ find_psc (GstBuffer * buffer, guint skip)
|
|||
if (gst_byte_reader_peek_uint24_be (&br, &psc) == FALSE)
|
||||
goto out;
|
||||
|
||||
/* Scan for the picture start code (22 bits - 0x0020) */
|
||||
/* Scan for the picture start code (22 bits - 0x0020)
|
||||
* startcode : 0000 0000 0000 0000 1000 00xx
|
||||
* mask (bin) : 1111 1111 1111 1111 1111 1100
|
||||
* mask (hex) : f f f f f c
|
||||
* match : 0 0 0 0 8 0
|
||||
*/
|
||||
while ((gst_byte_reader_get_remaining (&br) >= 3)) {
|
||||
if (gst_byte_reader_peek_uint24_be (&br, &psc) &&
|
||||
((psc & 0xffffc0) == 0x000080)) {
|
||||
((psc & 0xfffffc) == 0x000080)) {
|
||||
psc_pos = gst_byte_reader_get_pos (&br);
|
||||
break;
|
||||
} else if (gst_byte_reader_skip (&br, 1) == FALSE)
|
||||
|
|
Loading…
Reference in a new issue