# HG changeset patch # User reimar # Date 1354303807 0 # Node ID 6dc94af7016de63815e2699fa1681099faaea9b0 # Parent c2b5fda661431af13a96a88a81c2fe9f86b5953d Do not call af_fmt2str on the same data over and over. diff -r c2b5fda66143 -r 6dc94af7016d libaf/af_format.c --- a/libaf/af_format.c Fri Nov 30 19:25:20 2012 +0000 +++ b/libaf/af_format.c Fri Nov 30 19:30:07 2012 +0000 @@ -109,9 +109,10 @@ (AF_OK != check_format(af->data->format))) return AF_ERROR; + af_fmt2str(data->format,buf1,256); + af_fmt2str(af->data->format,buf2,256); mp_msg(MSGT_AFILTER, MSGL_V, "[format] Changing sample format from %s to %s\n", - af_fmt2str(data->format,buf1,256), - af_fmt2str(af->data->format,buf2,256)); + buf1, buf2); af->data->rate = data->rate; af->data->nch = data->nch; @@ -130,16 +131,14 @@ (af->data->format == AF_FORMAT_S16_NE)) { mp_msg(MSGT_AFILTER, MSGL_V, "[format] Accelerated %s to %s conversion\n", - af_fmt2str(data->format,buf1,256), - af_fmt2str(af->data->format,buf2,256)); + buf1, buf2); af->play = play_float_s16; } if ((data->format == AF_FORMAT_S16_NE) && (af->data->format == AF_FORMAT_FLOAT_NE)) { mp_msg(MSGT_AFILTER, MSGL_V, "[format] Accelerated %s to %s conversion\n", - af_fmt2str(data->format,buf1,256), - af_fmt2str(af->data->format,buf2,256)); + buf1, buf2); af->play = play_s16_float; } return AF_OK;