[FFmpeg-user] failed to compile with av_ts2timestr

Bang He hezhanbang at gmail.com
Sun May 29 05:04:29 EEST 2022

my application code will call some ffmpeg api.

here is my code which call ffmpeg api:
printf("pts %s\n", av_ts2timestr(packet.pts, stream->time_base));

error when compiled:
ffmpeg/include/libavutil/timestamp.h:76:83: error: taking address of
temporary array
 #define av_ts2timestr(ts, tb)
av_ts_make_time_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts, tb)

what should i do?

More information about the ffmpeg-user mailing list