[FFmpeg-devel] [PATCH] avformat/hls: avformat_find_stream_info when the audio list in the variant

Steven Liu lq at chinaffmpeg.org
Tue Jun 4 10:28:21 EEST 2019


Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
---
 libavformat/hls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 19ea88e706..7b29b3f5d1 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -1942,7 +1942,7 @@ static int hls_read_header(AVFormatContext *s)
          * but for other streams we can rely on our user calling avformat_find_stream_info()
          * on us if they want to.
          */
-        if (pls->is_id3_timestamped) {
+        if (pls->is_id3_timestamped || (pls->n_renditions > 0 && pls->renditions[0]->type == AVMEDIA_TYPE_AUDIO)) {
             ret = avformat_find_stream_info(pls->ctx, NULL);
             if (ret < 0)
                 goto fail;
-- 
2.17.2 (Apple Git-113)





More information about the ffmpeg-devel mailing list