On 2/5/22 00:42, Andreas Rheinhardt wrote:
a) We use the avpriv prefix for things that should be exported from one library to be used in other libraries, but not for public use. Therefore the avpriv prefix is inappropriate here as this function is static. And it makes a very long name.
So since this is static av_always_inline, it should just be start_code_is_valid()?
b) internal.h is the wrong header for this: There are more start codes than 00 00 01. That's why I sent the patch to move avpriv_find_start_code() to libavcodec/startcode.h.
I only put it there because that is where avpriv_find_start_code() is declared, so I knew it was already included.
Should I move the definition and declaration of avpriv_find_start_code() to startcode.(c|h)?
c) I am not sure that the new code is equivalent to the old one in all instances: mpeg12dec.c checks for "start_code > 0x1ff" to mean "no valid start code", yet if the buffer ended with anything in the range 0x00-0xff it would be considered a start code before this patch and now it would no longer be a start code. I don't think this is a bad change, though, but it should be noted in the commit message.
I'll have to look at them all again and I'll add that to the commit message. -Scott _______________________________________________ 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".