PR #22667 opened by deadbeef84 URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22667 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22667.patch
>From 4428fff57a7e0efe97636399138c478e18a1045f Mon Sep 17 00:00:00 2001 From: Jesper Ek <[email protected]> Date: Tue, 31 Mar 2026 14:07:51 +0200 Subject: [PATCH] gxf: return proper errors when reading packets --- libavformat/gxf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/gxf.c b/libavformat/gxf.c index 1a9f0d75b0..4a811a58d7 100644 --- a/libavformat/gxf.c +++ b/libavformat/gxf.c @@ -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); @@ -527,7 +527,7 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) { track_id = avio_r8(pb); stream_index = get_sindex(s, track_id, track_type); if (stream_index < 0) - return stream_index; + return AVERROR_INVALIDDATA; st = s->streams[stream_index]; field_nr = avio_rb32(pb); field_info = avio_rb32(pb); -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
