[asterisk-commits] rizzo: branch rizzo/video_v2 r85133 - /team/rizzo/video_v2/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Oct 9 10:48:51 CDT 2007
Author: rizzo
Date: Tue Oct 9 10:48:50 2007
New Revision: 85133
URL: http://svn.digium.com/view/asterisk?view=rev&rev=85133
Log:
found the bug - when searching for the start of block in H263, make sure you
don't hit the same point forever.
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=85133&r1=85132&r2=85133
==============================================================================
--- team/rizzo/video_v2/channels/console_video.c (original)
+++ team/rizzo/video_v2/channels/console_video.c Tue Oct 9 10:48:50 2007
@@ -650,7 +650,8 @@
* a '0' byte then look around for the 0000 0000 0000 0000 1 pattern
* which is both in the PSC and the GBSC.
*/
- for (i = H263_MIN_LEN, start = 0; start < len; start = i) {
+ for (i = H263_MIN_LEN, start = 0; start < len; start = i, i += 3) {
+ //ast_log(LOG_WARNING, "search at %d of %d/%d\n", i, start, len);
for (; i < len ; i++) {
uint8_t x, rpos, lpos;
if (d[i] != 0) /* cannot be in a GBSC */
@@ -688,7 +689,7 @@
/* This frame is up to offset i (not inclusive).
* We do not split it yet even if larger than MTU.
*/
-
+ //ast_log(LOG_WARNING, "frame size %d at %d\n", i - start, start);
f = create_video_frame(d + start, d+i, AST_FORMAT_H263,
pheader_len, cur);
@@ -1394,7 +1395,6 @@
AVCodecContext *c = env->in.dec_ctx;
b_in = &env->in.dec_out;
b_in->pix_fmt = c->pix_fmt;
- ast_log(LOG_WARNING, "dec_in pix_fmt %d %dx%d\n", c->pix_fmt, c->width, c->height);
b_in->w = c->width;
b_in->h = c->height;
@@ -1505,7 +1505,7 @@
if (v->dec_in.data == NULL) {
v->dec_in.size = need;
v->dec_in.used = 0;
- v->dec_in.data = ast_malloc(v->dec_in.size);
+ v->dec_in.data = ast_calloc(1, v->dec_in.size);
} else if (v->dec_in.used + need > v->dec_in.size) {
v->dec_in.size = v->dec_in.used + need;
v->dec_in.data = ast_realloc(v->dec_in.data, v->dec_in.size);
More information about the asterisk-commits
mailing list