Am Do., 27. Juni 2019 um 14:59 Uhr schrieb Zhong Li <zhong...@intel.com>:

> +/* return the 8 bit start code value and update the search
> +   state. Return -1 if no start code found */
> +static int find_frame_header_marker(const uint8_t **pbuf_ptr, const uint8_t 
> *buf_end)
> +{
> +    const uint8_t *buf_ptr;
> +    unsigned int v, v2;
> +    int val;
> +    int skipped = 0;
> +
> +    buf_ptr = *pbuf_ptr;
> +    while (buf_end - buf_ptr > 1) {
> +        v  = *buf_ptr++;
> +        v2 = *buf_ptr;
> +        if ((v == 0xff) && buf_ptr < buf_end &&
> +            ((v2 >= SOF0) && (v2 <= SOF3)) ) {
> +            val = *buf_ptr++;
> +            goto found;
> +        }
> +        skipped++;
> +    }
> +    buf_ptr = buf_end;
> +    val = -1;
> +found:
> +    ff_dlog(NULL, "find_marker skipped %d bytes\n", skipped);
> +    *pbuf_ptr = buf_ptr;
> +    return val;
> +}

Sorry for not realizing this earlier (I searched for "SOF0"):
Why is this function duplicated?

Carl Eugen
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to