avcodec/avpacket: use av_malloc() to allocate an AVPacket