@@ -781,22 +781,22 @@ static int vaapi_init(struct AVCodecContext *s){
781781#endif
782782
783783void print_codec_supp_pix_fmts (const enum AVPixelFormat *first) {
784- char out[STR_LEN];
785- snprintf (out, sizeof out,
786- MOD_NAME " Codec supported pixel formats: " TBOLD (" %s" ),
787- get_avpixfmts_names (first));
788- LOG (LOG_LEVEL_VERBOSE) << wrap_paragraph (out) << TERM_RESET " \n " ;
784+ MSG (VERBOSE, " Codec supported pixel formats: " TBOLD (" %s" ) " \n " ,
785+ get_avpixfmts_names (first));
789786}
790787
791788void print_pix_fmts (const list<enum AVPixelFormat>
792789 &req_pix_fmts, const enum AVPixelFormat *first) {
793790 print_codec_supp_pix_fmts (first);
794- char out[STR_LEN] = MOD_NAME " Supported pixel formats:" TERM_BOLD;
795- for (auto &c : req_pix_fmts) {
796- snprintf (out + strlen (out), sizeof out - strlen (out), " %s" ,
797- av_get_pix_fmt_name (c));
791+
792+ enum AVPixelFormat pixfmts[AV_PIX_FMT_NB];
793+ enum AVPixelFormat *pixfmts_it = pixfmts;
794+ for (const auto &c : req_pix_fmts) {
795+ *pixfmts_it++ = c;
798796 }
799- LOG (LOG_LEVEL_VERBOSE) << wrap_paragraph (out) << TERM_RESET " \n " ;
797+ *pixfmts_it++ = AV_PIX_FMT_NONE;
798+ MSG (VERBOSE, " Supported pixel formats: " TBOLD (" %s" ) " \n " ,
799+ get_avpixfmts_names (pixfmts));
800800}
801801
802802/* *
0 commit comments