Skip to content

Commit 662aeb8

Browse files
committed
vcomp/lavc: do not wrap the output for the output
Long lines do not harm here but it will make unusable grepping like in: <#479> and GH-480.
1 parent 1daec22 commit 662aeb8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/video_compress/libavcodec.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -781,22 +781,22 @@ static int vaapi_init(struct AVCodecContext *s){
781781
#endif
782782

783783
void 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

791788
void 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

Comments
 (0)