# HG changeset patch # User michael # Date 1235491967 0 # Node ID 2bf694251330508d4013f02e7dc9c4384468b5b3 # Parent c753d074bbedb61629b7808a8c1155a64cb87a6c Add ff_h263_find_resync_marker() to find the bit position of the next resync_marker, if any. patch by Gwenole Beauchesne gbeauchesne splitted-desktopcom based on suggested implementation by me diff -r c753d074bbed -r 2bf694251330 h263.c --- a/h263.c Tue Feb 24 15:56:53 2009 +0000 +++ b/h263.c Tue Feb 24 16:12:47 2009 +0000 @@ -3293,6 +3293,27 @@ } /** + * finds the next resync_marker + * @param p pointer to buffer to scan + * @param end pointer to the end of the buffer + * @return pointer to the next resync_marker, or \p end if none was found + */ +const uint8_t *ff_h263_find_resync_marker(const uint8_t *restrict p, const uint8_t * restrict end) +{ + assert(p < end); + + end-=2; + p++; + for(;p