avformat: prevent triggering request_probe assert in ff_read_packet
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Wed, 19 Oct 2016 17:23:49 +0000 (19:23 +0200)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sat, 26 Nov 2016 23:28:02 +0000 (00:28 +0100)
commitd69dc10466e234c0e4ff9cb7e4d0e5d63ceeb357
tree75c2834ea988e2df9734787bdc6db8fe2b98897d
parentd4f64a0f545e48224e985b50848153f0b779b8ff
avformat: prevent triggering request_probe assert in ff_read_packet

If probe_codec is called with pkt == NULL, it sets probe_packets to 0
and request_probe to -1.
However, request_probe can change when calling s->iformat->read_packet
and thus a probe_packets value of 0 doesn't guarantee a request_probe
value of -1.
In that case calling probe_codec again is necessary to prevent
triggering the assert.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit a5b4476a602f31e451b11ca0c18bc92be130a50e)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavformat/utils.c