History

fftools/ffprobe: stop using AVStream.side_data

James Almer committed 3 years ago

Commit d76b0c41 parent 235a66a1 file · +16 −18Browse files

Unified · Split

fftools/ffprobe.c+16−18
@@ -2314,16 +2314,9 @@ static void print_ambient_viewing_environment(WriterContext *w, · 2313 unmodified lines
23142314
23152315 static void print_pkt_side_data(WriterContext *w,
23162316 AVCodecParameters *par,
2317− const AVPacketSideData *side_data,
2318− int nb_side_data,
2319− SectionID id_data_list,
2317+ const AVPacketSideData *sd,
23202318 SectionID id_data)
23212319 {
2322− int i;
2323−
2324− writer_print_section_header(w, NULL, id_data_list);
2325− for (i = 0; i < nb_side_data; i++) {
2326− const AVPacketSideData *sd = &side_data[i];
23272320 const char *name = av_packet_side_data_name(sd->type);
23282321
23292322 writer_print_section_header(w, (void *)sd, id_data);
@@ -2417,9 +2410,6 @@ static void print_pkt_side_data(WriterContext *w, · 87 unmodified lines
24172410 } else if (sd->type == AV_PKT_DATA_AFD && sd->size > 0) {
24182411 print_int("active_format", *sd->data);
24192412 }
2420− writer_print_section_footer(w);
2421− }
2422− writer_print_section_footer(w);
24232413 }
24242414
24252415 static void print_private_data(WriterContext *w, void *priv_data)
@@ -2579,9 +2569,13 @@ static void show_packet(WriterContext *w, InputFile *ifile, AVPacket *pkt, int p · 153 unmodified lines
25792569 av_dict_free(&dict);
25802570 }
25812571
2582− print_pkt_side_data(w, st->codecpar, pkt->side_data, pkt->side_data_elems,
2583− SECTION_ID_PACKET_SIDE_DATA_LIST,
2584− SECTION_ID_PACKET_SIDE_DATA);
2572+ writer_print_section_header(w, NULL, SECTION_ID_PACKET_SIDE_DATA_LIST);
2573+ for (int i = 0; i < pkt->side_data_elems; i++) {
2574+ print_pkt_side_data(w, st->codecpar, &pkt->side_data[i],
2575+ SECTION_ID_PACKET_SIDE_DATA);
2576+ writer_print_section_footer(w);
2577+ }
2578+ writer_print_section_footer(w);
25852579 }
25862580
25872581 writer_print_section_footer(w);
@@ -3228,10 +3222,14 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id · 640 unmodified lines
32283222 if (do_show_stream_tags)
32293223 ret = show_tags(w, stream->metadata, in_program ? SECTION_ID_PROGRAM_STREAM_TAGS : SECTION_ID_STREAM_TAGS);
32303224
3231− if (stream->nb_side_data) {
3232− print_pkt_side_data(w, stream->codecpar, stream->side_data, stream->nb_side_data,
3233− SECTION_ID_STREAM_SIDE_DATA_LIST,
3234− SECTION_ID_STREAM_SIDE_DATA);
3225+ if (stream->codecpar->nb_coded_side_data) {
3226+ writer_print_section_header(w, NULL, SECTION_ID_STREAM_SIDE_DATA_LIST);
3227+ for (int i = 0; i < stream->codecpar->nb_coded_side_data; i++) {
3228+ print_pkt_side_data(w, stream->codecpar, &stream->codecpar->coded_side_data[i],
3229+ SECTION_ID_STREAM_SIDE_DATA);
3230+ writer_print_section_footer(w);
3231+ }
3232+ writer_print_section_footer(w);
32353233 }
32363234
32373235 writer_print_section_footer(w);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t