Avoid a segfault

Sometimes x264_encoder_encode should be called multiple times before returning
a frame