comparison libmpdemux/demux_nemesi.c @ 32124:93c6a603f4d3

Remove a pointless if.
author reimar
date Sun, 12 Sep 2010 16:10:18 +0000
parents a86413775fbe
children 5e5a5c52e264
comparison
equal deleted inserted replaced
32123:a86413775fbe 32124:93c6a603f4d3
230 mp_msg(MSGT_DEMUX, MSGL_INFO, "Detected as AUDIO stream...\n"); 230 mp_msg(MSGT_DEMUX, MSGL_INFO, "Detected as AUDIO stream...\n");
231 231
232 link_session_and_fetch_conf(ndsd, NEMESI_SESSION_AUDIO, 232 link_session_and_fetch_conf(ndsd, NEMESI_SESSION_AUDIO,
233 sess, &buff, NULL); 233 sess, &buff, NULL);
234 234
235 if (buff.len) {
236 wf = calloc(1,sizeof(*wf)+buff.len); 235 wf = calloc(1,sizeof(*wf)+buff.len);
237 wf->cbSize = buff.len; 236 wf->cbSize = buff.len;
238 memcpy(wf+1, buff.data, buff.len); 237 memcpy(wf+1, buff.data, buff.len);
239 } else {
240 wf = calloc(1,sizeof(*wf));
241 }
242 238
243 sh_audio->wf = wf; 239 sh_audio->wf = wf;
244 d_audio->sh = sh_audio; 240 d_audio->sh = sh_audio;
245 sh_audio->ds = d_audio; 241 sh_audio->ds = d_audio;
246 wf->nSamplesPerSec = 0; 242 wf->nSamplesPerSec = 0;
266 mp_msg(MSGT_DEMUX, MSGL_INFO, "Detected as VIDEO stream...\n"); 262 mp_msg(MSGT_DEMUX, MSGL_INFO, "Detected as VIDEO stream...\n");
267 263
268 link_session_and_fetch_conf(ndsd, NEMESI_SESSION_VIDEO, 264 link_session_and_fetch_conf(ndsd, NEMESI_SESSION_VIDEO,
269 sess, &buff, &fps); 265 sess, &buff, &fps);
270 266
271 if (buff.len) {
272 bih = calloc(1,sizeof(*bih)+buff.len); 267 bih = calloc(1,sizeof(*bih)+buff.len);
273 bih->biSize = sizeof(*bih)+buff.len; 268 bih->biSize = sizeof(*bih)+buff.len;
274 memcpy(bih+1, buff.data, buff.len); 269 memcpy(bih+1, buff.data, buff.len);
275 } else {
276 bih = calloc(1,sizeof(*bih));
277 bih->biSize = sizeof(*bih);
278 }
279 270
280 sh_video = new_sh_video(demuxer,0); 271 sh_video = new_sh_video(demuxer,0);
281 sh_video->bih = bih; 272 sh_video->bih = bih;
282 d_video = demuxer->video; 273 d_video = demuxer->video;
283 d_video->sh = sh_video; 274 d_video->sh = sh_video;