Mercurial > mplayer.hg
comparison demux_mpg.c @ 1162:11e49d541f11
packet 0x1B6 (mpeg4 stream) detection
author | arpi_esp |
---|---|
date | Mon, 18 Jun 2001 22:11:04 +0000 |
parents | 3bcc435cd5a2 |
children | 3f490fad9bdf |
comparison
equal
deleted
inserted
replaced
1161:67c144d47a81 | 1162:11e49d541f11 |
---|---|
247 return 0; | 247 return 0; |
248 } | 248 } |
249 | 249 |
250 int num_elementary_packets100=0; | 250 int num_elementary_packets100=0; |
251 int num_elementary_packets101=0; | 251 int num_elementary_packets101=0; |
252 int num_elementary_packets1B6=0; | |
252 | 253 |
253 int demux_mpg_es_fill_buffer(demuxer_t *demux){ | 254 int demux_mpg_es_fill_buffer(demuxer_t *demux){ |
254 //if(demux->type==DEMUXER_TYPE_MPEG_ES) | 255 //if(demux->type==DEMUXER_TYPE_MPEG_ES) |
255 // Elementary video stream | 256 // Elementary video stream |
256 if(demux->stream->eof) return 0; | 257 if(demux->stream->eof) return 0; |
308 printf("demux: file doesn't contain the selected audio or video stream\n"); | 309 printf("demux: file doesn't contain the selected audio or video stream\n"); |
309 return 0; | 310 return 0; |
310 } | 311 } |
311 } else { | 312 } else { |
312 if(head>=0x100 && head<0x1B0){ | 313 if(head>=0x100 && head<0x1B0){ |
313 if(head==0x100) | 314 if(head==0x100) ++num_elementary_packets100; else |
314 ++num_elementary_packets100; | 315 if(head==0x101) ++num_elementary_packets101; |
315 else | |
316 if(head==0x101) ++num_elementary_packets101; | |
317 if(verbose>=3) printf("Opps... elementary video packet found: %03X\n",head); | 316 if(verbose>=3) printf("Opps... elementary video packet found: %03X\n",head); |
318 } | 317 } else |
318 if(head==0x1B6) ++num_elementary_packets1B6; | |
319 #if 1 | 319 #if 1 |
320 if(num_elementary_packets100>50 && num_elementary_packets101>50 | 320 if(num_elementary_packets100>50 && num_elementary_packets101>50 |
321 && skipped>4000000){ | 321 && skipped>4000000){ |
322 if(verbose) printf("sync_mpeg_ps: seems to be ES stream...\n"); | 322 if(verbose) printf("sync_mpeg_ps: seems to be ES stream...\n"); |
323 demux->stream->eof=1; | 323 demux->stream->eof=1; |