LinuxTV Patchwork vdr-1.7.29 + h264 MBAFF

login
register
mail settings
Submitter Klaus Schmidinger
Date Sept. 18, 2012, 3:15 p.m.
Message ID <50589012.20300@tvdr.de>
Download mbox | patch
Permalink /patch/14509/
State New
Headers show

Comments

Klaus Schmidinger - Sept. 18, 2012, 3:15 p.m.
On 18.09.2012 17:07, VDR User wrote:
> On Tue, Sep 18, 2012 at 2:20 AM, Klaus Schmidinger
> <Klaus.Schmidinger@tvdr.de> wrote:
>> Please try whether this patch works with all the HD channels you can
>> receive.
>>
>> I would also appreciate if as many other VDR users as possible applied
>> this patch and tested it, so that we can be sure it works before I release
>> the next developer version.
>
> The patch fails on vanilla .30, do you have other patches applied to
> remux.c as well?

Sorry about that. There was an intermediate change in there that has
become obsolete by this latest change.

I have attached a new version.

Klaus
VDR User - Sept. 18, 2012, 5:53 p.m.
On Tue, Sep 18, 2012 at 8:15 AM, Klaus Schmidinger
<Klaus.Schmidinger@tvdr.de> wrote:
>>> I would also appreciate if as many other VDR users as possible applied
>>> this patch and tested it, so that we can be sure it works before I
>>> release
>>> the next developer version.
>>
>> The patch fails on vanilla .30, do you have other patches applied to
>> remux.c as well?
>
> Sorry about that. There was an intermediate change in there that has
> become obsolete by this latest change.
>
> I have attached a new version.

Still the same patch, just different filename. Maybe third time is a charm? ;)

Patch

--- remux.c	2012/09/14 09:06:14	2.65
+++ remux.c	2012/09/18 09:11:24
@@ -843,7 +843,8 @@ 
 
 int cFrameDetector::Analyze(const uchar *Data, int Length)
 {
-  int SeenPayloadStart = false;
+  bool SeenPayloadStart = false;
+  bool SeenAccessUnitDelimiter = false;
   int Processed = 0;
   newFrame = independentFrame = false;
   while (Length >= TS_SIZE) {
@@ -970,12 +971,16 @@ 
                                scanner = EMPTY_SCANNER;
                                if (synced && !SeenPayloadStart && Processed)
                                   return Processed; // flush everything before this new frame
+                               SeenAccessUnitDelimiter = true;
+                               }
+                            else if (SeenAccessUnitDelimiter && scanner == 0x00000001) { // NALU start
+                               SeenAccessUnitDelimiter = false;
                                int FrameTypeOffset = i + 1;
                                if (FrameTypeOffset >= TS_SIZE) // the byte to check is in the next TS packet
                                   i = SkipPackets(Data, Length, Processed, FrameTypeOffset);
                                newFrame = true;
-                               uchar FrameType = Data[FrameTypeOffset] & 0xE0;
-                               independentFrame = FrameType == 0x00;
+                               uchar FrameType = Data[FrameTypeOffset] & 0x1F;
+                               independentFrame = FrameType == 0x07;
                                if (synced) {
                                   if (framesPerPayloadUnit < 0) {
                                      payloadUnitOfFrame = (payloadUnitOfFrame + 1) % -framesPerPayloadUnit;

Privacy Policy