[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 18:43:50 EEST 2017


On Mon, Mar 27, 2017 at 05:07:34PM +0200, Nicolas George wrote:
> Le septidi 7 germinal, an CCXXV, Clement Boesch a écrit :
> > 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.
> 
> I believe you are mistaken:
> 
> # it has automatic storage duration associated with the enclosing block.
> 
> (6.5.2.5 Compound literals, #6)
> 
> It would be inconsistent otherwise: the compound literal would exist in
> the call to make_string() but disappear before the call to printf().
> 

Ah, I stand corrected. Alright, will adjust the code. Thanks.

-- 
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/de8c51e9/attachment.sig>


More information about the ffmpeg-devel mailing list