From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH 1/4] avformat/dvdvideodec: Explicitly return 0 on success Date: Sat, 2 Mar 2024 16:42:10 +0100 Message-ID: <AS8P250MB074422FE8D5933916C3A0C358F5D2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw) Don't "return ret" even when ret is zero on success. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavformat/dvdvideodec.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c index 3355010356..fd1f640560 100644 --- a/libavformat/dvdvideodec.c +++ b/libavformat/dvdvideodec.c @@ -863,7 +863,7 @@ static int dvdvideo_video_stream_setup(AVFormatContext *s) return ret; } - return ret; + return 0; } static int dvdvideo_audio_stream_analyze(AVFormatContext *s, audio_attr_t audio_attr, @@ -1032,7 +1032,7 @@ break_error: return ret; } - return ret; + return 0; } static int dvdvideo_subp_stream_analyze(AVFormatContext *s, uint32_t offset, subp_attr_t subp_attr, @@ -1056,7 +1056,6 @@ static int dvdvideo_subp_stream_add(AVFormatContext *s, DVDVideoPGCSubtitleStrea { AVStream *st; FFStream *sti; - int ret = 0; st = avformat_new_stream(s, NULL); if (!st) @@ -1080,7 +1079,7 @@ static int dvdvideo_subp_stream_add(AVFormatContext *s, DVDVideoPGCSubtitleStrea avpriv_set_pts_info(st, DVDVIDEO_PTS_WRAP_BITS, DVDVIDEO_TIME_BASE_Q.num, DVDVIDEO_TIME_BASE_Q.den); - return ret; + return 0; } static int dvdvideo_subp_stream_add_internal(AVFormatContext *s, uint32_t offset, @@ -1098,17 +1097,15 @@ static int dvdvideo_subp_stream_add_internal(AVFormatContext *s, uint32_t offset /* IFO structures can declare duplicate entries for the same startcode */ for (int i = 0; i < s->nb_streams; i++) if (s->streams[i]->id == entry.startcode) - goto end; + return 0; if ((ret = dvdvideo_subp_stream_add(s, &entry, AVSTREAM_PARSE_HEADERS)) < 0) goto end_error; - goto end; + return 0; end_error: av_log(s, AV_LOG_ERROR, "Unable to add subtitle stream\n"); - -end: return ret; } @@ -1291,7 +1288,7 @@ static int dvdvideo_read_header(AVFormatContext *s) if (!c->opt_preindex) return dvdvideo_chapters_setup_simple(s); - return ret; + return 0; } static int dvdvideo_read_packet(AVFormatContext *s, AVPacket *pkt) -- 2.40.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next reply other threads:[~2024-03-02 15:40 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-02 15:42 Andreas Rheinhardt [this message] 2024-03-02 15:43 ` [FFmpeg-devel] [PATCH 2/4] avformat/dvdvideodec: Don't store AVInputFormat* Andreas Rheinhardt 2024-03-02 15:43 ` [FFmpeg-devel] [PATCH 3/4] avformat/dvdvideodec: Only free allocated buffers Andreas Rheinhardt 2024-03-02 15:47 ` Andreas Rheinhardt 2024-03-02 15:51 ` James Almer 2024-03-02 16:19 ` Andreas Rheinhardt 2024-03-03 2:31 ` Marth64 2024-03-03 2:32 ` Marth64 2024-03-02 15:43 ` [FFmpeg-devel] [PATCH 4/4] avformat/dvdvideodec: Reorder allocations to simplify freeing Andreas Rheinhardt 2024-03-03 2:34 ` Marth64
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=AS8P250MB074422FE8D5933916C3A0C358F5D2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git