[FFmpeg-devel] [PATCH 04/10] lavf: fix usages of av_get_codec_tag_string()

Clément Bœsch u at pkh.me
Mon Mar 27 17:50:12 EEST 2017


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.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170327/87c0276a/attachment.sig>


More information about the ffmpeg-devel mailing list