[FFmpeg-cvslog] avformat/subfile: Assert that whence is a known case

Michael Niedermayer git at videolan.org
Sun Jan 5 01:28:21 EET 2025


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Sat Jun  8 20:46:28 2024 +0200| [ea0504bf81c98d3a977a47afce878775aef0e359] | committer: Michael Niedermayer

avformat/subfile: Assert that whence is a known case

This may help CID1452449 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 426d8c84c37064eef93bbcfaffd886d00a9a4ee8)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ea0504bf81c98d3a977a47afce878775aef0e359
---

 libavformat/subfile.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/subfile.c b/libavformat/subfile.c
index 0e84384600..9c099540f5 100644
--- a/libavformat/subfile.c
+++ b/libavformat/subfile.c
@@ -127,6 +127,8 @@ static int64_t subfile_seek(URLContext *h, int64_t pos, int whence)
     case SEEK_END:
         new_pos = c->end + c->pos;
         break;
+    default:
+        av_assert0(0);
     }
     if (new_pos < c->start)
         return AVERROR(EINVAL);



More information about the ffmpeg-cvslog mailing list