Message ID | 20170726043124.6296-2-jamrial@gmail.com |
---|---|
State | New |
Headers | show |
On 26 July 2017 at 05:31, James Almer <jamrial@gmail.com> wrote: > Print the name metadata entry and the buffer size. > > Signed-off-by: James Almer <jamrial@gmail.com> > --- > ffprobe.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/ffprobe.c b/ffprobe.c > index 3d9f795d2e..b4947df6e0 100644 > --- a/ffprobe.c > +++ b/ffprobe.c > @@ -2190,6 +2190,11 @@ static void show_frame(WriterContext *w, AVFrame > *frame, AVStream *stream, > AVContentLightMetadata *metadata = > (AVContentLightMetadata *)sd->data; > print_int("max_content", metadata->MaxCLL); > print_int("max_average", metadata->MaxFALL); > + } else if (sd->type == AV_FRAME_DATA_ICC_PROFILE) { > + AVDictionaryEntry *t = av_dict_get(sd->metadata, "name", > NULL, AV_DICT_MATCH_CASE); > small nit: using a single letter variable for something like this > + if (t) > + print_str("name", t->value); > + print_int("size", sd->size); > } > writer_print_section_footer(w); > } > -- > 2.13.3 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > Small nit aside, patch LGTM, tnx
On 7/26/2017 3:10 AM, Rostislav Pehlivanov wrote: > On 26 July 2017 at 05:31, James Almer <jamrial@gmail.com> wrote: > >> Print the name metadata entry and the buffer size. >> >> Signed-off-by: James Almer <jamrial@gmail.com> >> --- >> ffprobe.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/ffprobe.c b/ffprobe.c >> index 3d9f795d2e..b4947df6e0 100644 >> --- a/ffprobe.c >> +++ b/ffprobe.c >> @@ -2190,6 +2190,11 @@ static void show_frame(WriterContext *w, AVFrame >> *frame, AVStream *stream, >> AVContentLightMetadata *metadata = >> (AVContentLightMetadata *)sd->data; >> print_int("max_content", metadata->MaxCLL); >> print_int("max_average", metadata->MaxFALL); >> + } else if (sd->type == AV_FRAME_DATA_ICC_PROFILE) { >> + AVDictionaryEntry *t = av_dict_get(sd->metadata, "name", >> NULL, AV_DICT_MATCH_CASE); >> > > small nit: using a single letter variable for something like this Changed to tag. > > >> + if (t) >> + print_str("name", t->value); >> + print_int("size", sd->size); >> } >> writer_print_section_footer(w); >> } >> -- >> 2.13.3 >> >> _______________________________________________ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> > > Small nit aside, patch LGTM, tnx Pushed.
diff --git a/ffprobe.c b/ffprobe.c index 3d9f795d2e..b4947df6e0 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -2190,6 +2190,11 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, AVContentLightMetadata *metadata = (AVContentLightMetadata *)sd->data; print_int("max_content", metadata->MaxCLL); print_int("max_average", metadata->MaxFALL); + } else if (sd->type == AV_FRAME_DATA_ICC_PROFILE) { + AVDictionaryEntry *t = av_dict_get(sd->metadata, "name", NULL, AV_DICT_MATCH_CASE); + if (t) + print_str("name", t->value); + print_int("size", sd->size); } writer_print_section_footer(w); }
Print the name metadata entry and the buffer size. Signed-off-by: James Almer <jamrial@gmail.com> --- ffprobe.c | 5 +++++ 1 file changed, 5 insertions(+)