summaryrefslogtreecommitdiff
path: root/ffprobe.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-07 21:20:26 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-07 21:20:26 +0200
commit5f0ebe865c4238c7f42d2cdf6a1790eb8e5c8ac8 (patch)
tree303bee5ca353f12fdd808cf143c735bf9640fcc2 /ffprobe.c
parenta7dd933b811b799cc087508f24201f2593c07347 (diff)
downloadffmpeg-5f0ebe865c4238c7f42d2cdf6a1790eb8e5c8ac8.tar.gz
ffprobe: Use av_packet_side_data_name() to find the side data name
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ffprobe.c b/ffprobe.c
index d461844604..fadcd9336e 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1765,9 +1765,9 @@ static void show_packet(WriterContext *w, AVFormatContext *fmt_ctx, AVPacket *pk
writer_print_section_header(w, SECTION_ID_PACKET_SIDE_DATA_LIST);
for (i = 0; i < pkt->side_data_elems; i++) {
AVPacketSideData *sd = &pkt->side_data[i];
- const char *name;
+ const char *name = av_packet_side_data_name(sd->type);
writer_print_section_header(w, SECTION_ID_PACKET_SIDE_DATA);
- print_str("side_data_type", "unknown");
+ print_str("side_data_type", name ? name : "unknown");
print_int("side_data_size", sd->size);
if (sd->type == AV_PKT_DATA_DISPLAYMATRIX && sd->size >= 9*4) {
writer_print_integers(w, "displaymatrix", sd->data, 9, " %11d", 3, 4, 1);
@@ -2306,9 +2306,10 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
writer_print_section_header(w, SECTION_ID_STREAM_SIDE_DATA_LIST);
for (i = 0; i < stream->nb_side_data; i++) {
AVPacketSideData *sd = &stream->side_data[i];
- const char *name;
+ const char *name = av_packet_side_data_name(sd->type);
+
writer_print_section_header(w, SECTION_ID_STREAM_SIDE_DATA);
- print_str("side_data_type", "unknown");
+ print_str("side_data_type", name ? name : "unknown");
print_int("side_data_size", sd->size);
if (sd->type == AV_PKT_DATA_DISPLAYMATRIX && sd->size >= 9*4) {
writer_print_integers(w, "displaymatrix", sd->data, 9, " %11d", 3, 4, 1);