Revision 26379a77 chunker_streamer.c

View differences:

chunker_streamer.c
104 104
	chunk->frames_num = 0;
105 105
	chunk->payload_len = 0;
106 106
	chunk->len=0;
107
  if(chunk->data != NULL)
108
    free(chunk->data);
107 109
	chunk->data = NULL;
108 110
	chunk->start_time.tv_sec = -1;
109 111
	chunk->start_time.tv_usec = -1;
......
333 335
		return -1;
334 336
	}
335 337
	sizeChunk = 6*sizeof(int)+2*sizeof(struct timeval)+sizeof(double);
338
  chunk->data=NULL;
336 339
	initChunk(chunk,&seq_current_chunk);
337 340
	chunkaudio = (ExternalChunk *)malloc(sizeof(ExternalChunk));
338 341
	if(!chunkaudio) {
339 342
		fprintf(stderr, "Memory error!!!\n");
340 343
		return -1;
341 344
	}
345
  chunkaudio->data=NULL;
342 346
	initChunk(chunkaudio,&seq_current_chunk);
343 347
	stime = -1;
344 348
	
......
632 636
	free(chunk);
633 637
	free(chunkaudio);
634 638
	free(frame);
639
	free(outbuf);
640
	free(outbuf_audio);
635 641
	fclose(f1);
636 642

  
637 643
	// Writing chunk files
......
658 664
	// Close the video file
659 665
	av_close_input_file(pFormatCtx);
660 666
  
667
  SDL_Quit();
661 668
	return 0;
662 669
}

Also available in: Unified diff