* [FFmpeg-devel] [PATCH v2] avformat/img2dec: assert no pipe on ts_from_file
@ 2024-06-07 19:00 Michael Niedermayer
2024-07-02 18:32 ` Michael Niedermayer
0 siblings, 1 reply; 2+ messages in thread
From: Michael Niedermayer @ 2024-06-07 19:00 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Help coverity with CID1500302 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavformat/img2dec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index ba523530745..20b1bc31f6a 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -25,6 +25,7 @@
#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#include <sys/stat.h>
+#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
@@ -504,6 +505,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
pkt->flags |= AV_PKT_FLAG_KEY;
if (s->ts_from_file) {
struct stat img_stat;
+ av_assert0(!s->is_pipe); // The ts_from_file option is not supported by piped input demuxers
if (stat(filename, &img_stat)) {
res = AVERROR(EIO);
goto fail;
--
2.45.2
_______________________________________________
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
* Re: [FFmpeg-devel] [PATCH v2] avformat/img2dec: assert no pipe on ts_from_file
2024-06-07 19:00 [FFmpeg-devel] [PATCH v2] avformat/img2dec: assert no pipe on ts_from_file Michael Niedermayer
@ 2024-07-02 18:32 ` Michael Niedermayer
0 siblings, 0 replies; 2+ messages in thread
From: Michael Niedermayer @ 2024-07-02 18:32 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 634 bytes --]
On Fri, Jun 07, 2024 at 09:00:39PM +0200, Michael Niedermayer wrote:
> Help coverity with CID1500302 Uninitialized scalar variable
>
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavformat/img2dec.c | 2 ++
> 1 file changed, 2 insertions(+)
will apply
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
than the original author, trying to rewrite it will not make it better.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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-02 18:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-07 19:00 [FFmpeg-devel] [PATCH v2] avformat/img2dec: assert no pipe on ts_from_file Michael Niedermayer
2024-07-02 18:32 ` Michael Niedermayer
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