On Mon, Mar 27, 2017 at 11:59:05AM -0300, James Almer wrote: > On 3/27/2017 11:50 AM, Clément Bœsch wrote: > > On Mon, Mar 27, 2017 at 11:35:41AM -0300, James Almer wrote: > > [...] > >>> - char tag_buf[32]; > >>> - > >>> - av_get_codec_tag_string(tag_buf, sizeof(tag_buf), > >>> par->codec_tag); > >> > >> char *tag_buf = av_4cc2str(par->codec_tag); and keep the two line below > >> unchanged. > >> > > > > No, I can't do that, av_4cc2str() creates a temporary anonymous buffer > > with a reduced lifetime. It can only live within the function call. > > Then do > > char buf[AV_FOURCC_MAX_STRING_SIZE], *tag_buf = av_fourcc_make_string(buf, > par->codec_tag); > > av_4cc2str() seems mainly useful as a simplification when you're using > it once to me. > But it's a nit, so lgtm either way. >
as you wish, but note that in any case the call is made only once: it's in an error path. -- Clément B.
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel