[FFmpeg-devel] [PATCH 05/17] avformat/mxfenc: Remove redundant check

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Tue Nov 9 20:01:43 EET 2021


None of the muxers here has the AVFMT_NOSTREAMS flag set,
so it is checked generically that there are streams.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavformat/mxfenc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 3b6604d0d6..fd9e2c4c48 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -2507,9 +2507,6 @@ static int mxf_write_header(AVFormatContext *s)
     uint8_t present[FF_ARRAY_ELEMS(mxf_essence_container_uls)] = {0};
     int64_t timestamp = 0;
 
-    if (!s->nb_streams)
-        return -1;
-
     if (s->oformat == &ff_mxf_opatom_muxer && s->nb_streams !=1) {
         av_log(s, AV_LOG_ERROR, "there must be exactly one stream for mxf opatom\n");
         return -1;
-- 
2.30.2



More information about the ffmpeg-devel mailing list