comparison libmpdemux/demuxer.c @ 14160:467dae0f6c68

disable demuxer_bmp, that works with signle image in single file. removing is part of vu1nerabi1ity fix.
author iive
date Wed, 15 Dec 2004 18:39:51 +0000
parents 4802041ab8e3
children 2ae224195625
comparison
equal deleted inserted replaced
14159:88a58f2dda55 14160:467dae0f6c68
134 extern void demux_close_real(demuxer_t *demuxer); 134 extern void demux_close_real(demuxer_t *demuxer);
135 extern void demux_close_y4m(demuxer_t *demuxer); 135 extern void demux_close_y4m(demuxer_t *demuxer);
136 extern void demux_close_mf(demuxer_t* demuxer); 136 extern void demux_close_mf(demuxer_t* demuxer);
137 extern void demux_close_roq(demuxer_t* demuxer); 137 extern void demux_close_roq(demuxer_t* demuxer);
138 extern void demux_close_film(demuxer_t* demuxer); 138 extern void demux_close_film(demuxer_t* demuxer);
139 extern void demux_close_bmp(demuxer_t* demuxer);
140 extern void demux_close_fli(demuxer_t* demuxer); 139 extern void demux_close_fli(demuxer_t* demuxer);
141 extern void demux_close_nsv(demuxer_t* demuxer); 140 extern void demux_close_nsv(demuxer_t* demuxer);
142 extern void demux_close_nuv(demuxer_t* demuxer); 141 extern void demux_close_nuv(demuxer_t* demuxer);
143 extern void demux_close_audio(demuxer_t* demuxer); 142 extern void demux_close_audio(demuxer_t* demuxer);
144 extern void demux_close_ogg(demuxer_t* demuxer); 143 extern void demux_close_ogg(demuxer_t* demuxer);
186 demux_close_mf(demuxer); break; 185 demux_close_mf(demuxer); break;
187 case DEMUXER_TYPE_ROQ: 186 case DEMUXER_TYPE_ROQ:
188 demux_close_roq(demuxer); break; 187 demux_close_roq(demuxer); break;
189 case DEMUXER_TYPE_FILM: 188 case DEMUXER_TYPE_FILM:
190 demux_close_film(demuxer); break; 189 demux_close_film(demuxer); break;
191 case DEMUXER_TYPE_BMP:
192 demux_close_bmp(demuxer); break;
193 case DEMUXER_TYPE_FLI: 190 case DEMUXER_TYPE_FLI:
194 demux_close_fli(demuxer); break; 191 demux_close_fli(demuxer); break;
195 case DEMUXER_TYPE_NSV: 192 case DEMUXER_TYPE_NSV:
196 demux_close_nsv(demuxer); break; 193 demux_close_nsv(demuxer); break;
197 case DEMUXER_TYPE_NUV: 194 case DEMUXER_TYPE_NUV:
305 // 0 = EOF or no stream found or invalid type 302 // 0 = EOF or no stream found or invalid type
306 // 1 = successfully read a packet 303 // 1 = successfully read a packet
307 int demux_mf_fill_buffer( demuxer_t *demux); 304 int demux_mf_fill_buffer( demuxer_t *demux);
308 int demux_roq_fill_buffer(demuxer_t *demux); 305 int demux_roq_fill_buffer(demuxer_t *demux);
309 int demux_film_fill_buffer(demuxer_t *demux); 306 int demux_film_fill_buffer(demuxer_t *demux);
310 int demux_bmp_fill_buffer(demuxer_t *demux);
311 int demux_fli_fill_buffer(demuxer_t *demux); 307 int demux_fli_fill_buffer(demuxer_t *demux);
312 int demux_mpg_es_fill_buffer(demuxer_t *demux); 308 int demux_mpg_es_fill_buffer(demuxer_t *demux);
313 int demux_mpg_fill_buffer(demuxer_t *demux); 309 int demux_mpg_fill_buffer(demuxer_t *demux);
314 int demux_ty_fill_buffer(demuxer_t *demux); 310 int demux_ty_fill_buffer(demuxer_t *demux);
315 int demux_avi_fill_buffer(demuxer_t *demux); 311 int demux_avi_fill_buffer(demuxer_t *demux);
345 // printf("demux->type=%d\n",demux->type); 341 // printf("demux->type=%d\n",demux->type);
346 switch(demux->type){ 342 switch(demux->type){
347 case DEMUXER_TYPE_MF: return demux_mf_fill_buffer(demux); 343 case DEMUXER_TYPE_MF: return demux_mf_fill_buffer(demux);
348 case DEMUXER_TYPE_ROQ: return demux_roq_fill_buffer(demux); 344 case DEMUXER_TYPE_ROQ: return demux_roq_fill_buffer(demux);
349 case DEMUXER_TYPE_FILM: return demux_film_fill_buffer(demux); 345 case DEMUXER_TYPE_FILM: return demux_film_fill_buffer(demux);
350 case DEMUXER_TYPE_BMP: return demux_bmp_fill_buffer(demux);
351 case DEMUXER_TYPE_FLI: return demux_fli_fill_buffer(demux); 346 case DEMUXER_TYPE_FLI: return demux_fli_fill_buffer(demux);
352 case DEMUXER_TYPE_MPEG_TY: return demux_ty_fill_buffer( demux ); 347 case DEMUXER_TYPE_MPEG_TY: return demux_ty_fill_buffer( demux );
353 case DEMUXER_TYPE_MPEG4_ES: 348 case DEMUXER_TYPE_MPEG4_ES:
354 case DEMUXER_TYPE_H264_ES: 349 case DEMUXER_TYPE_H264_ES:
355 case DEMUXER_TYPE_MPEG_ES: return demux_mpg_es_fill_buffer(demux); 350 case DEMUXER_TYPE_MPEG_ES: return demux_mpg_es_fill_buffer(demux);
601 int mov_check_file(demuxer_t* demuxer); 596 int mov_check_file(demuxer_t* demuxer);
602 int mov_read_header(demuxer_t* demuxer); 597 int mov_read_header(demuxer_t* demuxer);
603 int demux_open_fli(demuxer_t* demuxer); 598 int demux_open_fli(demuxer_t* demuxer);
604 int demux_open_mf(demuxer_t* demuxer); 599 int demux_open_mf(demuxer_t* demuxer);
605 int demux_open_film(demuxer_t* demuxer); 600 int demux_open_film(demuxer_t* demuxer);
606 int demux_open_bmp(demuxer_t* demuxer);
607 int demux_open_roq(demuxer_t* demuxer); 601 int demux_open_roq(demuxer_t* demuxer);
608 #ifdef HAVE_LIBDV095 602 #ifdef HAVE_LIBDV095
609 int demux_open_rawdv(demuxer_t* demuxer); 603 int demux_open_rawdv(demuxer_t* demuxer);
610 extern int rawdv_check_file(demuxer_t *demuxer); 604 extern int rawdv_check_file(demuxer_t *demuxer);
611 #endif 605 #endif
628 extern int demux_mpg_open(demuxer_t* demuxer); 622 extern int demux_mpg_open(demuxer_t* demuxer);
629 extern int demux_rawaudio_open(demuxer_t* demuxer); 623 extern int demux_rawaudio_open(demuxer_t* demuxer);
630 extern int demux_rawvideo_open(demuxer_t* demuxer); 624 extern int demux_rawvideo_open(demuxer_t* demuxer);
631 extern int smjpeg_check_file(demuxer_t *demuxer); 625 extern int smjpeg_check_file(demuxer_t *demuxer);
632 extern int demux_open_smjpeg(demuxer_t* demuxer); 626 extern int demux_open_smjpeg(demuxer_t* demuxer);
633 extern int bmp_check_file(demuxer_t *demuxer);
634 extern int demux_xmms_open(demuxer_t* demuxer); 627 extern int demux_xmms_open(demuxer_t* demuxer);
635 extern int gif_check_file(demuxer_t *demuxer); 628 extern int gif_check_file(demuxer_t *demuxer);
636 extern int demux_open_gif(demuxer_t* demuxer); 629 extern int demux_open_gif(demuxer_t* demuxer);
637 extern int lmlm4_check_file(demuxer_t* demuxer); 630 extern int lmlm4_check_file(demuxer_t* demuxer);
638 extern int demux_open_lmlm4(demuxer_t* demuxer); 631 extern int demux_open_lmlm4(demuxer_t* demuxer);
907 free_demuxer(demuxer); 900 free_demuxer(demuxer);
908 demuxer = NULL; 901 demuxer = NULL;
909 } 902 }
910 } 903 }
911 #endif 904 #endif
912 //=============== Try to open as BMP file: =================
913 if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_BMP){
914 demuxer=new_demuxer(stream,DEMUXER_TYPE_BMP,audio_id,video_id,dvdsub_id);
915 if(bmp_check_file(demuxer)){
916 mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_Detected_XXX_FileFormat,"BMP");
917 file_format=DEMUXER_TYPE_BMP;
918 } else {
919 free_demuxer(demuxer);
920 demuxer = NULL;
921 }
922 }
923 #ifdef HAVE_OGGVORBIS 905 #ifdef HAVE_OGGVORBIS
924 //=============== Try to open as Ogg file: ================= 906 //=============== Try to open as Ogg file: =================
925 if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_OGG){ 907 if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_OGG){
926 demuxer=new_demuxer(stream,DEMUXER_TYPE_OGG,audio_id,video_id,dvdsub_id); 908 demuxer=new_demuxer(stream,DEMUXER_TYPE_OGG,audio_id,video_id,dvdsub_id);
927 if(demux_ogg_open(demuxer)){ 909 if(demux_ogg_open(demuxer)){
1188 case DEMUXER_TYPE_GIF: { 1170 case DEMUXER_TYPE_GIF: {
1189 if (!demux_open_gif(demuxer)) return NULL; 1171 if (!demux_open_gif(demuxer)) return NULL;
1190 break; 1172 break;
1191 } 1173 }
1192 #endif 1174 #endif
1193 case DEMUXER_TYPE_BMP: {
1194 if (!demux_open_bmp(demuxer)) return NULL;
1195 break;
1196 }
1197 case DEMUXER_TYPE_ROQ: { 1175 case DEMUXER_TYPE_ROQ: {
1198 if (!demux_open_roq(demuxer)) return NULL; 1176 if (!demux_open_roq(demuxer)) return NULL;
1199 break; 1177 break;
1200 } 1178 }
1201 case DEMUXER_TYPE_SMJPEG: { 1179 case DEMUXER_TYPE_SMJPEG: {