diff options
author | Edward Hervey <edward@centricular.com> | 2015-06-10 10:36:21 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2015-06-11 08:27:19 +0200 |
commit | 898b43621982175baba86fd02eadccf3af6c1091 (patch) | |
tree | 1e8c79bc2ad6dfdbde276b931b053891484f237c /gst/videoparsers | |
parent | 29c79d759509dccb3e67cbf7cd9cd820599b38a0 (diff) | |
download | gstreamer-plugins-bad-898b43621982175baba86fd02eadccf3af6c1091.tar.gz |
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
Diffstat (limited to 'gst/videoparsers')
-rw-r--r-- | gst/videoparsers/gsth263parse.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gst/videoparsers/gsth263parse.c b/gst/videoparsers/gsth263parse.c index 54932118d..454e84b5d 100644 --- a/gst/videoparsers/gsth263parse.c +++ b/gst/videoparsers/gsth263parse.c @@ -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) |