[FFmpeg-cvslog] avformat/flvdec: RtmpSampleAccess no longer breaks stream detection

Peter van der Spek git at videolan.org
Wed Sep 23 22:34:08 EEST 2020


ffmpeg | branch: master | Peter van der Spek <p.vanderspek at bluebillywig.com> | Wed Aug 19 09:06:54 2020 +0200| [c476cfd7ece24f8f5a458529d25c9b79a4fb24c7] | committer: Michael Niedermayer

avformat/flvdec: RtmpSampleAccess no longer breaks stream detection

Since release 4.2, FFmpeg fails to detect the correct streams in an RTMP
stream that contains a |RtmpSampleAccess AMF object prior to the
onMetaData AMF object. In the debug log it would show "[flv] Unknown
type |RtmpSampleAccess".

This functionality broke in commit d7638d8dfc3c4ffd0dc18a64937a5a07ed67b354
as unknown metadata packets now result in an opaque data stream, and the
|RtmpSampleAccess packet was an "unknown" metadata packet type.

With this change the RTMP streams are correctly detected when there
is a |RtmpSampleAccess object prior to the onMetaData object.

Signed-off-by: Peter van der Spek <p.vanderspek at bluebillywig.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c476cfd7ece24f8f5a458529d25c9b79a4fb24c7
---

 libavformat/flvdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 08622739f3..d480d0bc67 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -715,7 +715,7 @@ static int flv_read_metabody(AVFormatContext *s, int64_t next_pos)
     if (!strcmp(buffer, "onCaptionInfo"))
         return TYPE_ONCAPTIONINFO;
 
-    if (strcmp(buffer, "onMetaData") && strcmp(buffer, "onCuePoint")) {
+    if (strcmp(buffer, "onMetaData") && strcmp(buffer, "onCuePoint") && strcmp(buffer, "|RtmpSampleAccess")) {
         av_log(s, AV_LOG_DEBUG, "Unknown type %s\n", buffer);
         return TYPE_UNKNOWN;
     }



More information about the ffmpeg-cvslog mailing list