Author: pebender
Date: Sat Apr 25 18:18:03 2009
New Revision: 4666

Added:
     
trunk/gar-minimyth/script/myth-0.21/mythtv/files/mythtv-0.21-changeset-18944.patch
     
trunk/gar-minimyth/script/myth-0.21/mythtv/files/mythtv-0.21-ffmpeg_changeset-17091.patch
     
trunk/gar-minimyth/script/myth-trunk/mythtv/files/mythtv-trunk-ffmpeg_changeset-17091.patch
Modified:
    trunk/gar-minimyth/script/myth-0.21/mythtv/Makefile
    trunk/gar-minimyth/script/myth-0.21/mythtv/checksums
    trunk/gar-minimyth/script/myth-trunk/mythtv/Makefile
    trunk/gar-minimyth/script/myth-trunk/mythtv/checksums

Log:
- Patched MythTV 0.21 and trunk to fix MPEG PS detection bug.



Modified: trunk/gar-minimyth/script/myth-0.21/mythtv/Makefile
==============================================================================
--- trunk/gar-minimyth/script/myth-0.21/mythtv/Makefile (original)
+++ trunk/gar-minimyth/script/myth-0.21/mythtv/Makefile Sat Apr 25 18:18:03  
2009
@@ -5,6 +5,8 @@
  DISTFILES = $(DISTNAME).tar.bz2
  PATCHFILES  =
  PATCHFILES += \
+       $(DISTNAME_SHORT)-changeset-18944.patch \
+       $(DISTNAME_SHORT)-ffmpeg_changeset-17091.patch \
        $(DISTNAME_SHORT)-dvdnav_shared.patch \
        $(DISTNAME_SHORT)-libdvdread_udf.patch \
        $(DISTNAME_SHORT)-fftw3f.patch \

Modified: trunk/gar-minimyth/script/myth-0.21/mythtv/checksums
==============================================================================
--- trunk/gar-minimyth/script/myth-0.21/mythtv/checksums        (original)
+++ trunk/gar-minimyth/script/myth-0.21/mythtv/checksums        Sat Apr 25  
18:18:03 2009
@@ -1,3 +1,5 @@
+c0971696daccae6ae000ce0e230cdb77   
download/mythtv-0.21-changeset-18944.patch
+43859105412edbc7c00fdcd82006ceaa   
download/mythtv-0.21-ffmpeg_changeset-17091.patch
  beef26d2086a375d61bd6e71513bee8f  download/mythtv-0.21-dvdnav_shared.patch
  0e949d9909990665554532c939325d15  download/mythtv-0.21-libdvdread_udf.patch
  7fd9548e5650ef4e2124aebe2c799724  download/mythtv-0.21-fftw3f.patch

Added:  
trunk/gar-minimyth/script/myth-0.21/mythtv/files/mythtv-0.21-changeset-18944.patch
==============================================================================
--- (empty file)
+++  
trunk/gar-minimyth/script/myth-0.21/mythtv/files/mythtv-0.21-changeset-18944.patch
       
Sat Apr 25 18:18:03 2009
@@ -0,0 +1,67 @@
+diff -Naur mythtv-0.21-20436-old/libs/libavformat/mpeg.c  
mythtv-0.21-20436-new/libs/libavformat/mpeg.c
+--- mythtv-0.21-20436-old/libs/libavformat/mpeg.c      2009-04-22  
19:32:43.000000000 -0700
++++ mythtv-0.21-20436-new/libs/libavformat/mpeg.c      2009-04-25  
07:31:31.000000000 -0700
+@@ -66,35 +66,40 @@
+
+ static int mpegps_probe(AVProbeData *p)
+ {
++    uint32_t code= -1;
++    int sys=0, pspack=0, priv1=0, vid=0, audio=0, invalid=0;
+     int i;
+-    int size= FFMIN(2048, p->buf_size);
+-    uint32_t code=0xFF;
++    int score=0;
+
+-    /* we search the first start code. If it is a packet start code,
+-       then we decide it is mpeg ps. We do not send highest value to
+-       give a chance to mpegts */
+-    /* NOTE: the search range was restricted to avoid too many false
+-       detections */
+-
+-    for (i = 0; i < size; i++) {
+-        code = (code << 8) | p->buf[i];
++    for(i=0; i<p->buf_size; i++){
++        code = (code<<8) + p->buf[i];
+         if ((code & 0xffffff00) == 0x100) {
+-            if (code == PACK_START_CODE ||
+-                code == SYSTEM_HEADER_START_CODE ||
+-                (code >= 0x1e0 && code <= 0x1ef) ||
+-                (code >= 0x1c0 && code <= 0x1df) ||
+-                code == PRIVATE_STREAM_2 ||
+-                code == PROGRAM_STREAM_MAP ||
+-                code == PRIVATE_STREAM_1 ||
+-                code == PADDING_STREAM ||
+-                code >= 0x100 && code <= 0x1b0)
+-                return AVPROBE_SCORE_MAX - 2;
+-            else
+-                return 0;
++            int pes= check_pes(p->buf+i, p->buf+p->buf_size);
++
++            if(code == SYSTEM_HEADER_START_CODE) sys++;
++            else if(code == PRIVATE_STREAM_1)    priv1++;
++            else if(code == PACK_START_CODE)     pspack++;
++            else if((code & 0xf0) == VIDEO_ID &&  pes) vid++;
++            else if((code & 0xe0) == AUDIO_ID &&  pes) audio++;
++
++            else if((code & 0xf0) == VIDEO_ID && !pes) invalid++;
++            else if((code & 0xe0) == AUDIO_ID && !pes) invalid++;
+         }
+     }
+
+-    return 0;
++    if(vid+audio > invalid)     /* invalid VDR files nd short PES streams  
*/
++        score= AVPROBE_SCORE_MAX/4;
++
++//av_log(NULL, AV_LOG_ERROR, "%d %d %d %d %d len:%d\n", sys, priv1,  
pspack,vid, audio, p->buf_size);
++    if(sys>invalid && sys*9 <= pspack*10)
++        return AVPROBE_SCORE_MAX/2+2; // +1 for .mpg
++    if(priv1 + vid + audio > invalid && (priv1+vid+audio)*9 <= pspack*10)
++        return AVPROBE_SCORE_MAX/2+2; // +1 for .mpg
++    if((!!vid ^ !!audio) && (audio+vid > 1) && !sys && !pspack &&  
p->buf_size>2048) /* PES stream */
++        return AVPROBE_SCORE_MAX/2+2;
++
++    //02-Penguin.flac has sys:0 priv1:0 pspack:0 vid:0 audio:1
++    return score;
+ }
+
+ typedef struct MpegDemuxContext {

Added:  
trunk/gar-minimyth/script/myth-0.21/mythtv/files/mythtv-0.21-ffmpeg_changeset-17091.patch
==============================================================================
--- (empty file)
+++  
trunk/gar-minimyth/script/myth-0.21/mythtv/files/mythtv-0.21-ffmpeg_changeset-17091.patch
        
Sat Apr 25 18:18:03 2009
@@ -0,0 +1,12 @@
+diff -Naur mythtv-0.21-20436-old/libs/libavformat/mpeg.c  
mythtv-0.21-20436-new/libs/libavformat/mpeg.c
+--- mythtv-0.21-20436-old/libs/libavformat/mpeg.c      2009-04-25  
07:31:31.000000000 -0700
++++ mythtv-0.21-20436-new/libs/libavformat/mpeg.c      2009-04-25  
07:39:53.000000000 -0700
+@@ -95,7 +95,7 @@
+         return AVPROBE_SCORE_MAX/2+2; // +1 for .mpg
+     if(priv1 + vid + audio > invalid && (priv1+vid+audio)*9 <= pspack*10)
+         return AVPROBE_SCORE_MAX/2+2; // +1 for .mpg
+-    if((!!vid ^ !!audio) && (audio+vid > 1) && !sys && !pspack &&  
p->buf_size>2048) /* PES stream */
++    if((!!vid ^ !!audio) && (audio > 4 || vid > 1) && !sys && !pspack &&  
p->buf_size>2048) /* PES stream */
+         return AVPROBE_SCORE_MAX/2+2;
+
+     //02-Penguin.flac has sys:0 priv1:0 pspack:0 vid:0 audio:1

Modified: trunk/gar-minimyth/script/myth-trunk/mythtv/Makefile
==============================================================================
--- trunk/gar-minimyth/script/myth-trunk/mythtv/Makefile        (original)
+++ trunk/gar-minimyth/script/myth-trunk/mythtv/Makefile        Sat Apr 25  
18:18:03 2009
@@ -5,6 +5,7 @@
  DISTFILES = $(DISTNAME).tar.bz2
  PATCHFILES  =
  PATCHFILES += \
+       $(DISTNAME_SHORT)-ffmpeg_changeset-17091.patch \
        $(DISTNAME_SHORT)-dvdnav_shared.patch \
        $(DISTNAME_SHORT)-yasm.patch \
        $(DISTNAME_SHORT)-fftw3f.patch \

Modified: trunk/gar-minimyth/script/myth-trunk/mythtv/checksums
==============================================================================
--- trunk/gar-minimyth/script/myth-trunk/mythtv/checksums       (original)
+++ trunk/gar-minimyth/script/myth-trunk/mythtv/checksums       Sat Apr 25  
18:18:03 2009
@@ -1,3 +1,4 @@
+e06a55a68c3e67a7770983ef75da1ffe   
download/mythtv-trunk-ffmpeg_changeset-17091.patch
  9981c2e214cae343abf3924bd01705f4  download/mythtv-trunk-dvdnav_shared.patch
  4f471500ac11cafa1b7ce380ff691d07  download/mythtv-trunk-yasm.patch
  c980f46d533a5e7c701000567ee47e56  download/mythtv-trunk-fftw3f.patch

Added:  
trunk/gar-minimyth/script/myth-trunk/mythtv/files/mythtv-trunk-ffmpeg_changeset-17091.patch
==============================================================================
--- (empty file)
+++  
trunk/gar-minimyth/script/myth-trunk/mythtv/files/mythtv-trunk-ffmpeg_changeset-17091.patch
      
Sat Apr 25 18:18:03 2009
@@ -0,0 +1,12 @@
+diff -Naur mythtv-trunk-20445-old/libs/libavformat/mpeg.c  
mythtv-trunk-20445-new/libs/libavformat/mpeg.c
+--- mythtv-trunk-20445-old/libs/libavformat/mpeg.c     2009-04-23  
22:12:42.000000000 -0700
++++ mythtv-trunk-20445-new/libs/libavformat/mpeg.c     2009-04-25  
07:58:48.000000000 -0700
+@@ -95,7 +95,7 @@
+         return AVPROBE_SCORE_MAX/2+2; // +1 for .mpg
+     if(priv1 + vid + audio > invalid && (priv1+vid+audio)*9 <= pspack*10)
+         return AVPROBE_SCORE_MAX/2+2; // +1 for .mpg
+-    if((!!vid ^ !!audio) && (audio+vid > 1) && !sys && !pspack &&  
p->buf_size>2048) /* PES stream */
++    if((!!vid ^ !!audio) && (audio > 4 || vid > 1) && !sys && !pspack &&  
p->buf_size>2048) /* PES stream */
+         return AVPROBE_SCORE_MAX/2+2;
+
+     //02-Penguin.flac has sys:0 priv1:0 pspack:0 vid:0 audio:1

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to