# HG changeset patch # User reimar # Date 1384544189 0 # Node ID e76f2a8256a64eb3a57bfb145b1965dc196f67b7 # Parent ac8cef6c0dc3c3d77630f0b6a8746c3bfc38d789 Make PES detection less sensitive. Should fix potential mis-detection of some AAC streams. diff -r ac8cef6c0dc3 -r e76f2a8256a6 libmpdemux/demux_mpg.c --- a/libmpdemux/demux_mpg.c Fri Nov 15 19:36:27 2013 +0000 +++ b/libmpdemux/demux_mpg.c Fri Nov 15 19:36:29 2013 +0000 @@ -871,7 +871,12 @@ mp_msg(MSGT_DEMUX,MSGL_ERR,MSGTR_DoesntContainSelectedStream); return 0; } - if(demux->synced==3) demux->synced=(ret==1)?2:0; // PES detect + if(demux->synced == 3) { // PES detect + update_stats(head); + if (ret < 0) demux->synced = 0; + else if (ret == 1 && num_elementary_packetsPES > 1 && !mpeg_pts_error) demux->synced = 2; + else ret = 0; + } } else { update_stats(head); if(head>=0x100 && head<0x1B0)