* [FFmpeg-devel] [PATCH] avformat/dvdvideodec: Remove redundant ret initializations
@ 2024-07-02 6:03 Marth64
2024-07-06 11:11 ` Stefano Sabatini
0 siblings, 1 reply; 2+ messages in thread
From: Marth64 @ 2024-07-02 6:03 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Marth64
Remove initializing ret = 0, in areas where ret is
only used to hold an error value, immediately returned,
and the function would otherwise return a literal 0.
Signed-off-by: Marth64 <marth64@proxyid.net>
---
libavformat/dvdvideodec.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c
index f5b7dd33e5..a825e4c0bd 100644
--- a/libavformat/dvdvideodec.c
+++ b/libavformat/dvdvideodec.c
@@ -1056,7 +1056,7 @@ static int dvdvideo_video_stream_setup(AVFormatContext *s)
{
DVDVideoDemuxContext *c = s->priv_data;
- int ret = 0;
+ int ret;
DVDVideoVTSVideoStreamEntry entry = {0};
video_attr_t video_attr;
@@ -1217,7 +1217,7 @@ static int dvdvideo_audio_stream_add_all(AVFormatContext *s)
{
DVDVideoDemuxContext *c = s->priv_data;
- int ret = 0;
+ int ret;
int nb_streams;
if (c->opt_menu)
@@ -1324,7 +1324,7 @@ static int dvdvideo_subp_stream_add_internal(AVFormatContext *s, uint32_t offset
subp_attr_t subp_attr,
enum DVDVideoSubpictureViewport viewport)
{
- int ret = 0;
+ int ret;
DVDVideoPGCSubtitleStreamEntry entry = {0};
entry.viewport = viewport;
@@ -1361,7 +1361,7 @@ static int dvdvideo_subp_stream_add_all(AVFormatContext *s)
for (int i = 0; i < nb_streams; i++) {
- int ret = 0;
+ int ret;
uint32_t subp_control;
subp_attr_t subp_attr;
video_attr_t video_attr;
@@ -1469,7 +1469,7 @@ static int dvdvideo_subdemux_open(AVFormatContext *s)
{
DVDVideoDemuxContext *c = s->priv_data;
extern const FFInputFormat ff_mpegps_demuxer;
- int ret = 0;
+ int ret;
if (!(c->mpeg_buf = av_mallocz(DVDVIDEO_BLOCK_SIZE)))
return AVERROR(ENOMEM);
@@ -1504,7 +1504,7 @@ static int dvdvideo_read_header(AVFormatContext *s)
{
DVDVideoDemuxContext *c = s->priv_data;
- int ret = 0;
+ int ret;
if (c->opt_menu) {
if (c->opt_region ||
--
2.34.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".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-06 11:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-02 6:03 [FFmpeg-devel] [PATCH] avformat/dvdvideodec: Remove redundant ret initializations Marth64
2024-07-06 11:11 ` Stefano Sabatini
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