[MPlayer-cvslog] r37755 - trunk/libmpcodecs/ve_lavc.c

reimar subversion at mplayerhq.hu
Sat Feb 20 12:23:45 CET 2016


Author: reimar
Date: Sat Feb 20 12:23:45 2016
New Revision: 37755

Log:
ve_lavc: Check for ftell failure.

Avoids Coverity warning.

Modified:
   trunk/libmpcodecs/ve_lavc.c

Modified: trunk/libmpcodecs/ve_lavc.c
==============================================================================
--- trunk/libmpcodecs/ve_lavc.c	Sat Feb 20 12:11:18 2016	(r37754)
+++ trunk/libmpcodecs/ve_lavc.c	Sat Feb 20 12:23:45 2016	(r37755)
@@ -603,6 +603,10 @@ static int config(struct vf_instance *vf
 	}
 	fseek(stats_file, 0, SEEK_END);
 	size= ftell(stats_file);
+	if (size < 0) {
+	    mp_msg(MSGT_MENCODER,MSGL_ERR,"2pass failed: could not get size; filename=%s\n", passtmpfile);
+	    return 0;
+	}
 	fseek(stats_file, 0, SEEK_SET);
 
 	lavc_venc_context->stats_in= av_malloc(size + 1);


More information about the MPlayer-cvslog mailing list