diff mbox series

[FFmpeg-devel,2/7] avformat/segafilmenc: Postpone check for existence of video stream

Message ID 20200114031336.24096-2-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,1/7] avformat/segafilmenc: Fix undefined left shift of 1 by 31 places
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andreas Rheinhardt Jan. 14, 2020, 3:13 a.m. UTC
Up until now, the Sega FILM muxer complained if the first stream wasn't a
video stream that there is no video stream at all which is of course
nonsense. So postpone this check.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/segafilmenc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Michael Niedermayer Jan. 14, 2020, 10:02 p.m. UTC | #1
On Tue, Jan 14, 2020 at 04:13:31AM +0100, Andreas Rheinhardt wrote:
> Up until now, the Sega FILM muxer complained if the first stream wasn't a
> video stream that there is no video stream at all which is of course
> nonsense. So postpone this check.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/segafilmenc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

will apply

thx

[...]
diff mbox series

Patch

diff --git a/libavformat/segafilmenc.c b/libavformat/segafilmenc.c
index d721ec38fa..56fc59a811 100644
--- a/libavformat/segafilmenc.c
+++ b/libavformat/segafilmenc.c
@@ -183,11 +183,11 @@  static int film_init(AVFormatContext *format_context)
             }
             film->video_index = i;
         }
+    }
 
-        if (film->video_index == -1) {
-            av_log(format_context, AV_LOG_ERROR, "No video stream present.\n");
-            return AVERROR(EINVAL);
-        }
+    if (film->video_index == -1) {
+        av_log(format_context, AV_LOG_ERROR, "No video stream present.\n");
+        return AVERROR(EINVAL);
     }
 
     if (audio != NULL && get_audio_codec_id(audio->codecpar->codec_id) < 0) {