avcodec/amfnec: allocate packets using av_new_packet()