lavf: always unref the packet passed to av_interleaved_write_frame() on error