diff mbox

[FFmpeg-devel,2/2] avformat: Handle AV_CODEC_CAP_CHANNEL_CONF when first frame fails to decode

Message ID 20170829184007.9624-2-alex.converse@gmail.com
State New
Headers show

Commit Message

Alex Converse Aug. 29, 2017, 6:40 p.m. UTC
Fixes probing the stream from ticket 6398.

Noticed by James Almer.
---
 libavformat/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 23865c88c4..68ba8aa85b 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2997,7 +2997,7 @@  static int try_decode_frame(AVFormatContext *s, AVStream *st, AVPacket *avpkt,
     while ((pkt.size > 0 || (!pkt.data && got_picture)) &&
            ret >= 0 &&
            (!has_codec_parameters(st, NULL) || !has_decode_delay_been_guessed(st) ||
-            (!st->codec_info_nb_frames &&
+            (!st->nb_decoded_frames &&
              (avctx->codec->capabilities & AV_CODEC_CAP_CHANNEL_CONF)))) {
         got_picture = 0;
         if (avctx->codec_type == AVMEDIA_TYPE_VIDEO ||