[FFmpeg-devel] [PATCH 7/8] avfilter/vf_showinfo: use av_timecode_make_smpte_tc_string2

Marton Balint cus at passwd.hu
Tue Sep 8 20:56:44 EEST 2020



On Sun, 6 Sep 2020, lance.lmwang at gmail.com wrote:

> On Sat, Sep 05, 2020 at 08:22:16PM +0200, Marton Balint wrote:
>> Signed-off-by: Marton Balint <cus at passwd.hu>
>> ---
>>  libavfilter/vf_showinfo.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>> 
>> diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
>> index 1be939614d..c63e6f075f 100644
>> --- a/libavfilter/vf_showinfo.c
>> +++ b/libavfilter/vf_showinfo.c
>> @@ -114,7 +114,7 @@ static void dump_stereo3d(AVFilterContext *ctx, AVFrameSideData *sd)
>>          av_log(ctx, AV_LOG_INFO, " (inverted)");
>>  }
>> 
>> -static void dump_s12m_timecode(AVFilterContext *ctx, AVFrameSideData *sd)
>> +static void dump_s12m_timecode(AVFilterContext *ctx, AVFilterLink *link, AVFrameSideData *sd)
>
> use framerate direclty instead of link for input?

Sure, OK, changed locally.

Thanks,
Marton

>
>>  {
>>      const uint32_t *tc = (const uint32_t *)sd->data;
>> 
>> @@ -125,7 +125,7 @@ static void dump_s12m_timecode(AVFilterContext *ctx, AVFrameSideData *sd)
>>
>>      for (int j = 1; j <= tc[0]; j++) {
>>          char tcbuf[AV_TIMECODE_STR_SIZE];
>> -        av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0);
>> +        av_timecode_make_smpte_tc_string2(tcbuf, link->frame_rate, tc[j], 0, 0);
>>          av_log(ctx, AV_LOG_INFO, "timecode - %s%s", tcbuf, j != tc[0]  ? ", " : "");
>>      }
>>  }
>> @@ -380,7 +380,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
>>              dump_stereo3d(ctx, sd);
>>              break;
>>          case AV_FRAME_DATA_S12M_TIMECODE: {
>> -            dump_s12m_timecode(ctx, sd);
>> +            dump_s12m_timecode(ctx, inlink, sd);
>>              break;
>>          }
>>          case AV_FRAME_DATA_DISPLAYMATRIX:
>> -- 
>> 2.26.2
>> 
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> 
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
> -- 
> Thanks,
> Limin Wang
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list