comparison swf.c @ 360:81e90b91f457 libavformat

no limits!, warning is enough
author michael
date Sat, 07 Feb 2004 00:03:11 +0000
parents e9232aa21976
children 845f9de2c883
comparison
equal deleted inserted replaced
359:e9232aa21976 360:81e90b91f457
476 int c = 0; 476 int c = 0;
477 int outSize = 0; 477 int outSize = 0;
478 int outSamples = 0; 478 int outSamples = 0;
479 479
480 /* Flash Player limit */ 480 /* Flash Player limit */
481 if ( swf->swf_frame_number >= 16000 ) { 481 if ( swf->swf_frame_number == 16000 ) {
482 return 0; 482 fprintf(stderr, "warning: Flash Player limit of 16000 frames reached\n");
483 } 483 }
484 484
485 /* Store video data in queue */ 485 /* Store video data in queue */
486 if ( enc->codec_type == CODEC_TYPE_VIDEO ) { 486 if ( enc->codec_type == CODEC_TYPE_VIDEO ) {
487 SWFFrame *new_frame = av_malloc(sizeof(SWFFrame)); 487 SWFFrame *new_frame = av_malloc(sizeof(SWFFrame));
677 { 677 {
678 SWFContext *swf = s->priv_data; 678 SWFContext *swf = s->priv_data;
679 int c = 0; 679 int c = 0;
680 680
681 /* Flash Player limit */ 681 /* Flash Player limit */
682 if ( swf->swf_frame_number >= 16000 ) { 682 if ( swf->swf_frame_number == 16000 ) {
683 return 0; 683 fprintf(stderr, "warning: Flash Player limit of 16000 frames reached\n");
684 } 684 }
685 685
686 if (enc->codec_id == CODEC_ID_MP3 ) { 686 if (enc->codec_id == CODEC_ID_MP3 ) {
687 for (c=0; c<size; c++) { 687 for (c=0; c<size; c++) {
688 swf->audio_fifo[(swf->audio_out_pos+c)%AUDIO_FIFO_SIZE] = buf[c]; 688 swf->audio_fifo[(swf->audio_out_pos+c)%AUDIO_FIFO_SIZE] = buf[c];