1 diff -ruN replex-0.1.6.8/replex.c replex-0.1.6.8a/replex.c
2 --- replex-0.1.6.8/replex.c 2007-06-19 11:30:08.000000000 +0200
3 +++ replex-0.1.6.8a/replex.c 2008-03-20 10:31:31.000000000 +0100
8 - if (iu->length != aframe->framesize){
9 + if (iu->length != aframe->framesize && iu->length != aframe->framesize + 4){
11 fprintf(stderr,"Wrong audio frame size: %d (%d)\n",
12 iu->length, aframe->framesize);
15 case PRIVATE_STREAM1:{
17 + if (!rx->ac3n) break;
25 - rx->scan_found = 0x80;
26 + rx->scan_found = p->cid;
34 + case PRIVATE_STREAM1:
37 for (j=0; j < ac3n; j++)
38 @@ -1689,15 +1691,10 @@
41 ac3pid[ac3n]=rx->ac3_id[ac3n]=rx->scan_found;
43 - printf("possible AC3 AUDIO with private stream 1 pid (0xbd) \n");
46 - printf("AC3 AUDIO %d: 0x%02x (%d) \n",
51 + printf("AC3 AUDIO %d: 0x%02x (%d) \n",
55 if (ac3n+1< MAXAC3PID) ac3n++;
58 @@ -2406,8 +2403,11 @@
61 while (get_next_video_unit(rx, &dummy)){
62 - ring_read_file(&rx->vrbuffer, rx->dmx_out[0],
64 + if ( ! rx->audio_only )
65 + ring_read_file(&rx->vrbuffer, rx->dmx_out[0],
68 + ring_skip(&rx->vrbuffer, dummy.length);
73 printf (" --allow_jump, -j : allow jump in the PTS and try repair\n");
74 printf (" --keep_PTS, -k : keep and don't correct PTS information of original\n");
75 printf (" --min_jump, -l <integer> : don't try to fix jumps in PTS larger than <int> but treat them as a cut (default 100ms)\n");
76 + printf (" --audio_only -n : don't demux video stream\n");
77 printf (" --of, -o <filename> : set output file\n");
78 printf (" --fillzero -p : fill audio frames with zeros (only MPEG AUDIO)\n");
79 printf (" --max_overflow -q <integer> : max_number of overflows allowed (default: 100, 0=no restriction)\n");
80 @@ -2518,20 +2519,21 @@
81 {"ac3_id", required_argument, NULL, 'c'},
82 {"video_delay", required_argument, NULL, 'd'},
83 {"audio_delay", required_argument, NULL, 'e'},
84 - {"ignore_PTS",required_argument, NULL, 'f'},
85 + {"ignore_PTS",no_argument, NULL, 'f'},
86 {"larger_buffer",required_argument, NULL, 'g'},
87 {"help", no_argument , NULL, 'h'},
88 {"input_stream", required_argument, NULL, 'i'},
89 - {"allow_jump",required_argument, NULL, 'j'},
90 - {"keep_PTS",required_argument, NULL, 'k'},
91 + {"allow_jump",no_argument, NULL, 'j'},
92 + {"keep_PTS",no_argument, NULL, 'k'},
93 {"min_jump",required_argument, NULL, 'l'},
94 + {"audio_only",no_argument, NULL, 'n'},
95 {"of",required_argument, NULL, 'o'},
96 - {"fillzero",required_argument, NULL, 'p'},
97 + {"fillzero",no_argument, NULL, 'p'},
98 {"max_overflow",required_argument, NULL, 'q'},
99 - {"scan",required_argument, NULL, 's'},
100 + {"scan",no_argument, NULL, 's'},
101 {"type", required_argument, NULL, 't'},
102 {"video_pid", required_argument, NULL, 'v'},
103 - {"vdr",required_argument, NULL, 'x'},
104 + {"vdr",no_argument, NULL, 'x'},
105 {"analyze",required_argument, NULL, 'y'},
106 {"demux",no_argument, NULL, 'z'},
108 @@ -2580,11 +2582,14 @@
109 rx.allow_jump = MIN_JUMP;
116 min_jump = strtol(optarg,(char **)NULL, 0) *CLOCK_MS;
124 @@ -2726,19 +2731,21 @@
128 - snprintf(fname,256,"%s.mv2",filename);
129 - if ((rx.dmx_out[0] = open(fname,O_WRONLY|
136 - perror("Error opening output file");
138 + if( ! rx.audio_only ) {
139 + snprintf(fname,256,"%s.mv2",filename);
140 + if ((rx.dmx_out[0] = open(fname,O_WRONLY|
147 + perror("Error opening output file");
150 + fprintf(stderr,"Video output File is: %s\n",
153 - fprintf(stderr,"Video output File is: %s\n",
156 for (i=0; i < rx.apidn; i++){
157 snprintf(fname,256,"%s%d.mp2",filename
158 diff -ruN replex-0.1.6.8/replex.h replex-0.1.6.8a/replex.h
159 --- replex-0.1.6.8/replex.h 2007-06-19 11:30:08.000000000 +0200
160 +++ replex-0.1.6.8a/replex.h 2008-03-20 10:31:31.000000000 +0100
167 uint64_t video_delay;
168 uint64_t audio_delay;
169 --- replex-0.1.6.8/element.c 2007-06-19 11:30:08.000000000 +0200
170 +++ replex-0.1.6.8a/element.c 2008-12-18 19:27:35.452042858 +0100
177 int sample_rate_index;
181 int get_ac3_info(ringbuffer *rbuf, audio_frame_t *af, long off, int le, int verb)