exit with error code if av_encode failed
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Tue, 20 Jan 2009 21:09:51 +0000 (21:09 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Tue, 20 Jan 2009 21:09:51 +0000 (21:09 +0000)
Originally committed as revision 16704 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index cdb5e20ca75227e8b8464ca288da4a234b844dab..ee6b01784a51ec372b370879319fbd7daf9a1aa7 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3918,8 +3918,9 @@ int main(int argc, char **argv)
     }
 
     ti = getutime();
-    av_encode(output_files, nb_output_files, input_files, nb_input_files,
-              stream_maps, nb_stream_maps);
+    if (av_encode(output_files, nb_output_files, input_files, nb_input_files,
+                  stream_maps, nb_stream_maps) < 0)
+        av_exit(1);
     ti = getutime() - ti;
     if (do_benchmark) {
         printf("bench: utime=%0.3fs\n", ti / 1000000.0);