mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
Add check for the return value of av_packet_alloc() to avoid potential NULL pointer dereference. Moreover, replace redundant av_free() with fprintf(). Fixes:9a38184a14("examples/decode_audio: allocate the packet dynamically") Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commitc64cff64a2) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>