[Libav-user] av_probe_input_format fails the second time

Alex Cohn alexcohn at netvision.net.il
Thu Jan 12 11:30:35 CET 2012


On Wed, Jan 11, 2012 at 17:52,  <francesco at bltitalia.com> wrote:
>
> Hi to all
> I am writing a routine that decode a mpeg2 frame stored in a buffer.
...
> This code works well for the first frame, in the second frame the
> function av_probe_input_format fails.  Any idea ?

You are not expected to reinitialize the codec for every frame. The
code snippet you published should not be called in a loop, only once
per video stream.

BR,
Alex


More information about the Libav-user mailing list