avformat/movenc: Fix segfault upon allocation error