Commit 89898cd3 authored by Nicolas George's avatar Nicolas George

ffprobe: fix validity error with tags and data.

Add "data" and "extradata" attributes to the schema.
Add "tag" element in "streams".
Print extradata before tags to avoid closing the element.

Fix trac ticket #1588.
parent 52bd9cb4
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
<xsd:attribute name="size" type="xsd:long" use="required" /> <xsd:attribute name="size" type="xsd:long" use="required" />
<xsd:attribute name="pos" type="xsd:long" /> <xsd:attribute name="pos" type="xsd:long" />
<xsd:attribute name="flags" type="xsd:string" use="required" /> <xsd:attribute name="flags" type="xsd:string" use="required" />
<xsd:attribute name="data" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="frameType"> <xsd:complexType name="frameType">
...@@ -86,6 +87,10 @@ ...@@ -86,6 +87,10 @@
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="streamType"> <xsd:complexType name="streamType">
<xsd:sequence>
<xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="index" type="xsd:int" use="required"/> <xsd:attribute name="index" type="xsd:int" use="required"/>
<xsd:attribute name="codec_name" type="xsd:string" /> <xsd:attribute name="codec_name" type="xsd:string" />
<xsd:attribute name="codec_long_name" type="xsd:string" /> <xsd:attribute name="codec_long_name" type="xsd:string" />
...@@ -94,6 +99,7 @@ ...@@ -94,6 +99,7 @@
<xsd:attribute name="codec_time_base" type="xsd:string" use="required"/> <xsd:attribute name="codec_time_base" type="xsd:string" use="required"/>
<xsd:attribute name="codec_tag" type="xsd:string" use="required"/> <xsd:attribute name="codec_tag" type="xsd:string" use="required"/>
<xsd:attribute name="codec_tag_string" type="xsd:string" use="required"/> <xsd:attribute name="codec_tag_string" type="xsd:string" use="required"/>
<xsd:attribute name="extradata" type="xsd:string" />
<!-- video attributes --> <!-- video attributes -->
<xsd:attribute name="width" type="xsd:int"/> <xsd:attribute name="width" type="xsd:int"/>
......
...@@ -1844,10 +1844,10 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i ...@@ -1844,10 +1844,10 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
else print_str_opt("nb_read_frames", "N/A"); else print_str_opt("nb_read_frames", "N/A");
if (nb_streams_packets[stream_idx]) print_fmt ("nb_read_packets", "%"PRIu64, nb_streams_packets[stream_idx]); if (nb_streams_packets[stream_idx]) print_fmt ("nb_read_packets", "%"PRIu64, nb_streams_packets[stream_idx]);
else print_str_opt("nb_read_packets", "N/A"); else print_str_opt("nb_read_packets", "N/A");
show_tags(stream->metadata);
if (do_show_data) if (do_show_data)
writer_print_data(w, "extradata", dec_ctx->extradata, writer_print_data(w, "extradata", dec_ctx->extradata,
dec_ctx->extradata_size); dec_ctx->extradata_size);
show_tags(stream->metadata);
print_section_footer("stream"); print_section_footer("stream");
av_bprint_finalize(&pbuf, NULL); av_bprint_finalize(&pbuf, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment