[svn-commits] rizzo: branch rizzo/video_v2 r82744 - /team/rizzo/video_v2/channels/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Sep 18 01:43:16 CDT 2007


Author: rizzo
Date: Tue Sep 18 01:43:16 2007
New Revision: 82744

URL: http://svn.digium.com/view/asterisk?view=rev&rev=82744
Log:
don't try to encode when the buffer is not allocated.

Modified:
    team/rizzo/video_v2/channels/console_video.c

Modified: team/rizzo/video_v2/channels/console_video.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/video_v2/channels/console_video.c?view=diff&rev=82744&r1=82743&r2=82744
==============================================================================
--- team/rizzo/video_v2/channels/console_video.c (original)
+++ team/rizzo/video_v2/channels/console_video.c Tue Sep 18 01:43:16 2007
@@ -1003,9 +1003,11 @@
 
 	/* get frame and put them in the queue */
 	show_frame(env, 1);
+	if (env->out.decbuf.size == 0)
+		return NULL;
 	buflen = avcodec_encode_video(env->out.context,
 		env->out.decbuf.data, env->out.decbuf.size, env->out.frame);
-	// fprintf(stderr, "avcodec_encode_video returns %d\n", buflen);
+	// fprintf(stderr, "avcodec_encode_video in %d returns %d\n", env->out.decbuf.size, buflen);
 	return split_frame(&(env->out), buflen);
 }
 




More information about the svn-commits mailing list