|
From: <bc...@us...> - 2010-01-29 15:24:41
|
Revision: 1460
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1460&view=rev
Author: bcholew
Date: 2010-01-29 15:24:33 +0000 (Fri, 29 Jan 2010)
Log Message:
-----------
Check for, and handle, slicer failures.
Modified Paths:
--------------
trunk/lib/codec_theora.c
trunk/lib/video.c
Modified: trunk/lib/codec_theora.c
===================================================================
--- trunk/lib/codec_theora.c 2010-01-29 15:21:03 UTC (rev 1459)
+++ trunk/lib/codec_theora.c 2010-01-29 15:24:33 UTC (rev 1460)
@@ -306,7 +306,11 @@
slice_set->key_frame = theora_packet_iskeyframe(&op) == 1;
// Slice the frame
- slice((char *)op.packet, op.bytes, slice_set, e->sc);
+ if ( slice((char *)op.packet, op.bytes, slice_set, e->sc) )
+ {
+ fprintf(stderr, "codec_theora: failed to slice an encoded packet\n");
+ return -1;
+ }
return 0;
}
Modified: trunk/lib/video.c
===================================================================
--- trunk/lib/video.c 2010-01-29 15:21:03 UTC (rev 1459)
+++ trunk/lib/video.c 2010-01-29 15:24:33 UTC (rev 1460)
@@ -1830,7 +1830,14 @@
vinfo.sc = create_slicer_context((unsigned short)rand(),
vfinfo.fragsize);
- slice(data, size, &slice_set, vinfo.sc);
+ if ( slice(data, size, &slice_set, vinfo.sc) )
+ {
+ fprintf(stderr, "iaxc_push_video: Failed to slice frame,"
+ " call %d, size %d\n",
+ selected_call, size);
+ return -1;
+ }
+
for ( i = 0 ; i < slice_set.num_slices ; i++ )
{
if ( iax_send_video_trunk(call->session,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|