On Thu, Mar 17, 2016 at 1:21 PM, Hendrik Leppkes <h.lepp...@gmail.com> wrote: > On Thu, Mar 17, 2016 at 1:10 PM, Mark Thompson <s...@jkqxz.net> wrote: >>> >>> Wouldn't it be simpler then to add a condition to the existing loop to >>> only error out when no NALs exist? >> >> I apologise if I'm not understanding exactly what you mean, but wouldn't that >> then accept any trailing garbage at all as long as there is one valid NAL >> unit? > > Yes, it would. From what I can tell, that just how h264 works as well, > and to share code, it could probably even be adjusted to use > avpriv_find_start_code, since the structure of the start codes is > exactly the same. > Decoders should generally be rather forgiving, and if we can decode > one or more NALs from a buffer, then we shouldn't discard all of that > work on account of a few random bytes, IMHO. > > That said, how do these extra zeros even end up being left over? From > what I can tell, ff_hevc_extract_rbsp should consume all data from the > previous start code up to the next one? >
Something I forgot to mention, it would already skip random garbage in between NALs right now, and just error out when its at the end of a buffer. That seems inconsistent, if anything. - Hendrik _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel