mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
fftools/ffplay.c: Also print demuxer-level metadata updates.
This commit is contained in:
@@ -3007,6 +3007,7 @@ static int read_thread(void *arg)
|
|||||||
// initial metadata as update.
|
// initial metadata as update.
|
||||||
st->event_flags &= ~AVSTREAM_EVENT_FLAG_METADATA_UPDATED;
|
st->event_flags &= ~AVSTREAM_EVENT_FLAG_METADATA_UPDATED;
|
||||||
}
|
}
|
||||||
|
ic->event_flags &= ~AVFMT_EVENT_FLAG_METADATA_UPDATED;
|
||||||
for (i = 0; i < AVMEDIA_TYPE_NB; i++) {
|
for (i = 0; i < AVMEDIA_TYPE_NB; i++) {
|
||||||
if (wanted_stream_spec[i] && st_index[i] == -1) {
|
if (wanted_stream_spec[i] && st_index[i] == -1) {
|
||||||
av_log(NULL, AV_LOG_ERROR, "Stream specifier %s does not match any %s stream\n", wanted_stream_spec[i], av_get_media_type_string(i));
|
av_log(NULL, AV_LOG_ERROR, "Stream specifier %s does not match any %s stream\n", wanted_stream_spec[i], av_get_media_type_string(i));
|
||||||
@@ -3175,16 +3176,24 @@ static int read_thread(void *arg)
|
|||||||
is->eof = 0;
|
is->eof = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (show_status && ic->streams[pkt->stream_index]->event_flags &
|
if (show_status) {
|
||||||
AVSTREAM_EVENT_FLAG_METADATA_UPDATED) {
|
if (ic->event_flags & AVFMT_EVENT_FLAG_METADATA_UPDATED) {
|
||||||
fprintf(stderr, "\x1b[2K\r");
|
fprintf(stderr, "\x1b[2K\r");
|
||||||
snprintf(metadata_description,
|
dump_dictionary(NULL, ic->metadata,
|
||||||
sizeof(metadata_description),
|
"\r New metadata", " ", AV_LOG_INFO);
|
||||||
"\r New metadata for stream %d",
|
}
|
||||||
pkt->stream_index);
|
if (ic->streams[pkt->stream_index]->event_flags &
|
||||||
dump_dictionary(NULL, ic->streams[pkt->stream_index]->metadata,
|
AVSTREAM_EVENT_FLAG_METADATA_UPDATED) {
|
||||||
metadata_description, " ", AV_LOG_INFO);
|
fprintf(stderr, "\x1b[2K\r");
|
||||||
|
snprintf(metadata_description,
|
||||||
|
sizeof(metadata_description),
|
||||||
|
"\r New metadata for stream %d",
|
||||||
|
pkt->stream_index);
|
||||||
|
dump_dictionary(NULL, ic->streams[pkt->stream_index]->metadata,
|
||||||
|
metadata_description, " ", AV_LOG_INFO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
ic->event_flags &= ~AVFMT_EVENT_FLAG_METADATA_UPDATED;
|
||||||
ic->streams[pkt->stream_index]->event_flags &= ~AVSTREAM_EVENT_FLAG_METADATA_UPDATED;
|
ic->streams[pkt->stream_index]->event_flags &= ~AVSTREAM_EVENT_FLAG_METADATA_UPDATED;
|
||||||
|
|
||||||
/* check if packet is in play range specified by user, then queue, otherwise discard */
|
/* check if packet is in play range specified by user, then queue, otherwise discard */
|
||||||
|
|||||||
Reference in New Issue
Block a user