This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new a79a84a9fe avformat/pdvenc: don't return EIO
a79a84a9fe is described below
commit a79a84a9fe02999169ac9ff40f06c5d5aa823b96
Author: James Almer <[email protected]>
AuthorDate: Thu Sep 17 11:02:06 2026 -0300
Commit: James Almer <[email protected]>
CommitDate: Thu Sep 17 11:02:06 2026 -0300
avformat/pdvenc: don't return EIO
That error code must not be set by muxers, only by underlying protocols.
Signed-off-by: James Almer <[email protected]>
---
libavformat/pdvenc.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/libavformat/pdvenc.c b/libavformat/pdvenc.c
index 1c9744457e..62376d785f 100644
--- a/libavformat/pdvenc.c
+++ b/libavformat/pdvenc.c
@@ -105,6 +105,8 @@ static int pdv_write_header(AVFormatContext *s)
avio_write(s->pb, PDV_MAGIC, 16);
pdv->nb_frames_pos = avio_tell(s->pb);
+ if (pdv->nb_frames_pos < 0)
+ return pdv->nb_frames_pos;
avio_wl16(s->pb, 0);
avio_wl16(s->pb, 0);
avio_wl32(s->pb, pdv->fps_bits);
@@ -112,11 +114,12 @@ static int pdv_write_header(AVFormatContext *s)
avio_wl16(s->pb, st->codecpar->height);
pdv->table_pos = avio_tell(s->pb);
+ if (pdv->table_pos < 0)
+ return pdv->table_pos;
ffio_fill(s->pb, 0, 4LL * (pdv->max_frames + 1));
pdv->payload_start = avio_tell(s->pb);
-
- if (pdv->nb_frames_pos < 0 || pdv->table_pos < 0 || pdv->payload_start < 0)
- return AVERROR(EIO);
+ if (pdv->payload_start < 0)
+ return pdv->payload_start;
return 0;
}
@@ -128,10 +131,10 @@ static int pdv_write_packet(AVFormatContext *s, AVPacket
*pkt)
const uint32_t max_table_gap = 4U * pdv->max_frames;
if (offset < 0)
- return AVERROR(EIO);
+ return offset;
offset -= pdv->payload_start;
if (offset < 0)
- return AVERROR(EIO);
+ return AVERROR(EINVAL);
if (pkt->size <= 0)
return AVERROR_INVALIDDATA;
@@ -162,7 +165,7 @@ static int pdv_write_trailer(AVFormatContext *s)
int64_t ret;
if (payload_size < 0)
- return AVERROR(EIO);
+ return payload_size;
payload_size -= pdv->payload_start;
if (payload_size < 0 || payload_size > PDV_MAX_OFFSET - table_gap)
return AVERROR(EINVAL);
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]