avformat/mpc: deallocate frames array on errors