Break infinite loop in FFMpeg::read_frame() (#2576)
Break infinite loop in FFMpeg::read_frame() (#2576)

Codecs which set the CODEC_CAP_DELAY capability led to infinite
loops during reading (see #2571). Once AVERROR_EOF is returned,
no more packets are going to be received, regardless of internal
buffering. break out of the loop in that case.

I've verified that this resolves the livelock following decoding
of the first packet in the Notcurses AVI test case which
illustrated this problem. I've also verified that said AVI
advertises the CODEC_CAP_DELAY attribute, matching the proposed
fix. In addition, I verified that OIIO continues to decode all
my other test cases without trouble. I hand-inspected the media,
and verified that the frame counts were precisely correct.

It is legal to pass NULL/0 into the decoder regardless of
CODEC_CAP_DELAY, and thus this whole conditional can really
be eliminated (I have no mention of it in my FFmpeg wrappers).
I haven't bothered to do that here, but it's a thought for the
future. Closes #2571.
lgritz/oiio,OpenImageIO/oiio,lgritz/oiio,OpenImageIO/oiio,lgritz/oiio,OpenImageIO/oiio,OpenImageIO/oiio,lgritz/oiio