summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorPierre-Anthony Lemieux <pal@palemieux.com>2023-04-26 08:09:40 -0700
committerPierre-Anthony Lemieux <pal@palemieux.com>2023-05-11 09:04:37 -0700
commit23d968d55a6e00dfc46799cfd0eb2ed02379037d (patch)
treee82539b90f15b7bcea463859aa2849ac8e70e0dd /libavformat
parent9f4df9a535c37cd63ed05dce215d37dec469e7d8 (diff)
downloadffmpeg-23d968d55a6e00dfc46799cfd0eb2ed02379037d.tar.gz
avformat/imf: fix invalid resource handling
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/imf_cpl.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c
index ad84a68b13..a7cf5fa360 100644
--- a/libavformat/imf_cpl.c
+++ b/libavformat/imf_cpl.c
@@ -608,11 +608,10 @@ static int push_main_audio_sequence(xmlNodePtr audio_sequence_elem, FFIMFCPL *cp
ret = fill_trackfile_resource(resource_elem,
&vt->resources[vt->resource_count],
cpl);
- vt->resource_count++;
- if (ret) {
+ if (ret)
av_log(NULL, AV_LOG_ERROR, "Invalid Resource\n");
- continue;
- }
+ else
+ vt->resource_count++;
resource_elem = xmlNextElementSibling(resource_elem);
}
@@ -691,11 +690,10 @@ static int push_main_image_2d_sequence(xmlNodePtr image_sequence_elem, FFIMFCPL
ret = fill_trackfile_resource(resource_elem,
&cpl->main_image_2d_track->resources[cpl->main_image_2d_track->resource_count],
cpl);
- cpl->main_image_2d_track->resource_count++;
- if (ret) {
+ if (ret)
av_log(NULL, AV_LOG_ERROR, "Invalid Resource\n");
- continue;
- }
+ else
+ cpl->main_image_2d_track->resource_count++;
resource_elem = xmlNextElementSibling(resource_elem);
}