Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
ffworker
Commits
c4fd51df
Commit
c4fd51df
authored
Dec 01, 2017
by
Julian Rother
Browse files
probe: Fixed xmp_chapters value if no chapters are found
parent
be4cc756
Changes
1
Show whitespace changes
Inline
Side-by-side
probe.c
View file @
c4fd51df
...
...
@@ -28,20 +28,20 @@ char *get_xmpchapters(char *xmp)
xmlNodePtr
node
;
double
framerate
,
start
;
if
(
!
(
doc
=
xmlParseMemory
(
xmp
,
strlen
(
xmp
))))
return
""
;
return
"
[]
"
;
if
(
!
(
xpath
=
xmlXPathNewContext
(
doc
)))
return
""
;
return
"
[]
"
;
xmlXPathRegisterNs
(
xpath
,
"x"
,
"adobe:ns:meta/"
);
xmlXPathRegisterNs
(
xpath
,
"rdf"
,
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
);
xmlXPathRegisterNs
(
xpath
,
"xmpDM"
,
"http://ns.adobe.com/xmp/1.0/DynamicMedia/"
);
res
=
xmlXPathEvalExpression
(
"/x:xmpmeta/rdf:RDF/rdf:Description/@xmpDM:videoFrameRate"
,
xpath
);
if
(
!
res
||
!
res
->
nodesetval
->
nodeNr
)
return
""
;
return
"
[]
"
;
framerate
=
strtod
(
res
->
nodesetval
->
nodeTab
[
0
]
->
children
->
content
,
0
);
xmlXPathFreeObject
(
res
);
res
=
xmlXPathEvalExpression
(
"/x:xmpmeta/rdf:RDF/rdf:Description/xmpDM:Tracks/rdf:Bag/rdf:li/rdf:Description/xmpDM:markers/rdf:Seq/rdf:li/rdf:Description"
,
xpath
);
if
(
!
res
||
!
res
->
nodesetval
)
return
""
;
return
"
[]
"
;
ptr
=
0
;
size
=
0
;
if
(
!
(
stream
=
open_memstream
(
&
ptr
,
&
size
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment