diff mbox series

[FFmpeg-devel,v2,3/3] avformat/imfdec: variable initialiaztion cosmetics

Message ID 20221002162755.8413-3-pal@sandflow.com
State Accepted
Commit 89a49fd5a97c4b3afe9e5d27602983f884945fb4
Headers show
Series [FFmpeg-devel,v2,1/3] avformat/imfdec: use CPL start timecode if available | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Pierre-Anthony Lemieux Oct. 2, 2022, 4:27 p.m. UTC
From: Pierre-Anthony Lemieux <pal@palemieux.com>

---
 libavformat/imf_cpl.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c
index 183e6dd84e..ad84a68b13 100644
--- a/libavformat/imf_cpl.c
+++ b/libavformat/imf_cpl.c
@@ -72,10 +72,9 @@  xmlNodePtr ff_imf_xml_get_child_element_by_name(xmlNodePtr parent, const char *n
 
 int ff_imf_xml_read_uuid(xmlNodePtr element, AVUUID uuid)
 {
-    xmlChar *element_text = NULL;
     int ret = 0;
 
-    element_text = xmlNodeListGetString(element->doc, element->xmlChildrenNode, 1);
+    xmlChar *element_text = xmlNodeListGetString(element->doc, element->xmlChildrenNode, 1);
     ret = av_uuid_urn_parse(element_text, uuid);
     if (ret) {
         av_log(NULL, AV_LOG_ERROR, "Invalid UUID\n");
@@ -88,10 +87,9 @@  int ff_imf_xml_read_uuid(xmlNodePtr element, AVUUID uuid)
 
 int ff_imf_xml_read_rational(xmlNodePtr element, AVRational *rational)
 {
-    xmlChar *element_text = NULL;
     int ret = 0;
 
-    element_text = xmlNodeListGetString(element->doc, element->xmlChildrenNode, 1);
+    xmlChar *element_text = xmlNodeListGetString(element->doc, element->xmlChildrenNode, 1);
     if (sscanf(element_text, "%i %i", &rational->num, &rational->den) != 2) {
         av_log(NULL, AV_LOG_ERROR, "Invalid rational number\n");
         ret = AVERROR_INVALIDDATA;
@@ -103,10 +101,9 @@  int ff_imf_xml_read_rational(xmlNodePtr element, AVRational *rational)
 
 int ff_imf_xml_read_uint32(xmlNodePtr element, uint32_t *number)
 {
-    xmlChar *element_text = NULL;
     int ret = 0;
 
-    element_text = xmlNodeListGetString(element->doc, element->xmlChildrenNode, 1);
+    xmlChar *element_text = xmlNodeListGetString(element->doc, element->xmlChildrenNode, 1);
     if (sscanf(element_text, "%" PRIu32, number) != 1) {
         av_log(NULL, AV_LOG_ERROR, "Invalid unsigned 32-bit integer");
         ret = AVERROR_INVALIDDATA;