mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
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".
This commit is contained in:
committed by
Marton Balint
co-authored by
Marton Balint
parent
1a2c16fe51
commit
d5a913f99f
+3
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user