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 d5a913f99f avformat/gxf: return proper errors when reading 
header/packet
d5a913f99f is described below

commit d5a913f99f91bcda8f61ab5708a6ff1f8a4747fe
Author:     Jesper Ek <[email protected]>
AuthorDate: Tue Mar 31 14:07:51 2026 +0200
Commit:     Marton Balint <[email protected]>
CommitDate: Sun May 3 20:03:00 2026 +0000

    avformat/gxf: return proper errors when reading header/packet
    
    Returning -1 resulted in an "operation not permitted" error which
    was incorrect. This changes the error to a correct "invalid data".
---
 libavformat/gxf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/gxf.c b/libavformat/gxf.c
index 1a9f0d75b0..80e3e38811 100644
--- a/libavformat/gxf.c
+++ b/libavformat/gxf.c
@@ -394,13 +394,13 @@ static int gxf_header(AVFormatContext *s) {
         avio_skip(pb, map_len);
     if (!parse_packet_header(pb, &pkt_type, &len)) {
         av_log(s, AV_LOG_ERROR, "sync lost in header\n");
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
     if (pkt_type == PKT_FLT) {
         gxf_read_index(s, len);
         if (!parse_packet_header(pb, &pkt_type, &len)) {
             av_log(s, AV_LOG_ERROR, "sync lost in header\n");
-            return -1;
+            return AVERROR_INVALIDDATA;
         }
     }
     if (pkt_type == PKT_UMF) {
@@ -508,7 +508,7 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) {
         if (!parse_packet_header(pb, &pkt_type, &pkt_len)) {
             if (!avio_feof(pb))
                 av_log(s, AV_LOG_ERROR, "sync lost\n");
-            return -1;
+            return AVERROR_INVALIDDATA;
         }
         if (pkt_type == PKT_FLT) {
             gxf_read_index(s, pkt_len);

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to