[FFmpeg-devel] [PATCH] examples/muxing: zero AVPacket before	av_read_frame()
    Andrey Utkin 
    andrey.krieger.utkin at gmail.com
       
    Tue Jan 28 15:42:54 CET 2014
    
    
  
2014-01-28 Andrey Utkin <andrey.krieger.utkin at gmail.com>:
> av_read_frame() uses AVPacket.buf pointer value, so we must initialize
> it with NULL.  It is not documented whether av_read_frame() relies on
> any else initial values of AVPacket fields. So to stay safe, we zero all
> AVPacket memory.
Well, this is still not exactly pedantic. I've read that it cannot be
reliably assumed that NULL pointer is expressed as all-zeros.
-- 
Andrey Utkin
    
    
More information about the ffmpeg-devel
mailing list