aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarth64 <marth64@proxyid.net>2024-07-02 01:03:29 -0500
committerStefano Sabatini <stefasab@gmail.com>2024-07-13 17:17:27 +0200
commitf37f86a774fab1f760efa920b797e2d3229c6e27 (patch)
treee393ab71e1d0a6000e366e0de409625b8a8b81fc
parenteb07a593d346b835df60fe923331c62e3aa10c22 (diff)
downloadffmpeg-f37f86a774fab1f760efa920b797e2d3229c6e27.tar.gz
avformat/dvdvideodec: Remove redundant ret initializations
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>
-rw-r--r--libavformat/dvdvideodec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c
index 59b8762503..87fae71411 100644
--- a/libavformat/dvdvideodec.c
+++ b/libavformat/dvdvideodec.c
@@ -1063,7 +1063,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;
@@ -1224,7 +1224,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)
@@ -1331,7 +1331,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;
@@ -1368,7 +1368,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;
@@ -1476,7 +1476,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);
@@ -1511,7 +1511,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 ||