Revision 5ca3d85e

View differences:

chunker_player/player_core.c
226 226
	wanted_spec.samples = SDL_AUDIO_BUFFER_SIZE;
227 227
	wanted_spec.callback = AudioCallback;
228 228
	wanted_spec.userdata = aCodecCtx;
229
	if(!SilentMode)
230
		if(SDL_OpenAudio(&wanted_spec,&AudioSpecification)<0) {
231
			fprintf(stderr,"SDL_OpenAudio: %s\n",SDL_GetError());
232
			return -1;
233
		}
229
	if(SDL_OpenAudio(&wanted_spec,&AudioSpecification)<0)
230
	{
231
		fprintf(stderr,"SDL_OpenAudio: %s\n",SDL_GetError());
232
		return -1;
233
	}
234 234
	dimAudioQ = AudioSpecification.size;
235 235
	deltaAudioQ = (float)((float)AudioSpecification.samples)*1000/AudioSpecification.freq;
236 236

  
......
976 976
	static uint8_t audio_buf[AVCODEC_MAX_AUDIO_FRAME_SIZE];
977 977

  
978 978
	audio_size = AudioDecodeFrame(audio_buf, sizeof(audio_buf));
979
	if(audio_size != len) {
980
		memset(stream, 0, len);
981
	} else {
982
		memcpy(stream, (uint8_t *)audio_buf, len);
983
	}
979
	
980
	if(!SilentMode)
981
		if(audio_size != len) {
982
			memset(stream, 0, len);
983
		} else {
984
			memcpy(stream, (uint8_t *)audio_buf, len);
985
		}
984 986
}
985 987

  
986 988
void SaveFrame(AVFrame *pFrame, int width, int height)

Also available in: Unified diff