mirror of
https://github.com/mpv-player/mpv
synced 2025-01-27 10:03:32 +00:00
packet 0x1B6 (mpeg4 stream) detection
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1163 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
679adfb5e5
commit
d2a4cbd4da
10
demux_mpg.c
10
demux_mpg.c
@ -249,6 +249,7 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){
|
|||||||
|
|
||||||
int num_elementary_packets100=0;
|
int num_elementary_packets100=0;
|
||||||
int num_elementary_packets101=0;
|
int num_elementary_packets101=0;
|
||||||
|
int num_elementary_packets1B6=0;
|
||||||
|
|
||||||
int demux_mpg_es_fill_buffer(demuxer_t *demux){
|
int demux_mpg_es_fill_buffer(demuxer_t *demux){
|
||||||
//if(demux->type==DEMUXER_TYPE_MPEG_ES)
|
//if(demux->type==DEMUXER_TYPE_MPEG_ES)
|
||||||
@ -310,12 +311,11 @@ do{
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(head>=0x100 && head<0x1B0){
|
if(head>=0x100 && head<0x1B0){
|
||||||
if(head==0x100)
|
if(head==0x100) ++num_elementary_packets100; else
|
||||||
++num_elementary_packets100;
|
if(head==0x101) ++num_elementary_packets101;
|
||||||
else
|
|
||||||
if(head==0x101) ++num_elementary_packets101;
|
|
||||||
if(verbose>=3) printf("Opps... elementary video packet found: %03X\n",head);
|
if(verbose>=3) printf("Opps... elementary video packet found: %03X\n",head);
|
||||||
}
|
} else
|
||||||
|
if(head==0x1B6) ++num_elementary_packets1B6;
|
||||||
#if 1
|
#if 1
|
||||||
if(num_elementary_packets100>50 && num_elementary_packets101>50
|
if(num_elementary_packets100>50 && num_elementary_packets101>50
|
||||||
&& skipped>4000000){
|
&& skipped>4000000){
|
||||||
|
Loading…
Reference in New Issue
Block a user