Mercurial > mplayer.hg
comparison mplayer.c @ 500:c2b3a1f340c8
MPEG-ES segfault fixed, stream list printfs moved v 1->0
author | arpi_esp |
---|---|
date | Wed, 18 Apr 2001 01:55:18 +0000 |
parents | d4eb6bd44bbc |
children | 2951d138ddaf |
comparison
equal
deleted
inserted
replaced
499:3601edb3805c | 500:c2b3a1f340c8 |
---|---|
261 | 261 |
262 sh_audio_t* new_sh_audio(int id){ | 262 sh_audio_t* new_sh_audio(int id){ |
263 if(avi_header.a_streams[id]){ | 263 if(avi_header.a_streams[id]){ |
264 printf("Warning! Audio stream header %d redefined!\n",id); | 264 printf("Warning! Audio stream header %d redefined!\n",id); |
265 } else { | 265 } else { |
266 if(verbose) printf("Found audio stream: %d\n",id); | 266 printf("==> Found audio stream: %d\n",id); |
267 avi_header.a_streams[id]=malloc(sizeof(sh_audio_t)); | 267 avi_header.a_streams[id]=malloc(sizeof(sh_audio_t)); |
268 memset(avi_header.a_streams[id],0,sizeof(sh_audio_t)); | 268 memset(avi_header.a_streams[id],0,sizeof(sh_audio_t)); |
269 } | 269 } |
270 return avi_header.a_streams[id]; | 270 return avi_header.a_streams[id]; |
271 } | 271 } |
272 | 272 |
273 sh_video_t* new_sh_video(int id){ | 273 sh_video_t* new_sh_video(int id){ |
274 if(avi_header.v_streams[id]){ | 274 if(avi_header.v_streams[id]){ |
275 printf("Warning! video stream header %d redefined!\n",id); | 275 printf("Warning! video stream header %d redefined!\n",id); |
276 } else { | 276 } else { |
277 if(verbose) printf("Found video stream: %d\n",id); | 277 printf("==> Found video stream: %d\n",id); |
278 avi_header.v_streams[id]=malloc(sizeof(sh_video_t)); | 278 avi_header.v_streams[id]=malloc(sizeof(sh_video_t)); |
279 memset(avi_header.v_streams[id],0,sizeof(sh_video_t)); | 279 memset(avi_header.v_streams[id],0,sizeof(sh_video_t)); |
280 } | 280 } |
281 return avi_header.v_streams[id]; | 281 return avi_header.v_streams[id]; |
282 } | 282 } |
823 sh_video->bih->biBitCount); | 823 sh_video->bih->biBitCount); |
824 break; | 824 break; |
825 } | 825 } |
826 case DEMUXER_TYPE_MPEG_ES: { | 826 case DEMUXER_TYPE_MPEG_ES: { |
827 d_audio->type=0; | 827 d_audio->type=0; |
828 has_audio=0;sh_audio=NULL; // ES streams has no audio channel | 828 has_audio=0;sh_audio=NULL; // ES streams has no audio channel |
829 d_video->sh=new_sh_video(0); // create dummy video stream header, id=0 | |
829 break; | 830 break; |
830 } | 831 } |
831 case DEMUXER_TYPE_MPEG_PS: { | 832 case DEMUXER_TYPE_MPEG_PS: { |
832 if(has_audio) | 833 if(has_audio) |
833 if(!ds_fill_buffer(d_audio)){ | 834 if(!ds_fill_buffer(d_audio)){ |