This avoids blocking for a long time in
avformat_find_stream_info while waiting for a codec to be set
for data streams in MS-RTSP streams, where the codec won't
ever be set.
This is an adaptation of one part of commit 4c050429780b0d
in FFmpeg.
Alternatively, we could just ignore data streams in MS-RTSP
and not pass them through to the caller.
---
libavformat/utils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index f38045c..c657f97 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2061,6 +2061,8 @@ static int has_codec_parameters(AVStream *st)
if (st->info->found_decoder >= 0 && avctx->pix_fmt == PIX_FMT_NONE)
return 0;
break;
+ case AVMEDIA_TYPE_DATA:
+ return 1;
default:
val = 1;
break;
--
1.7.9.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel