-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overwriting PES and mux/demux errors. #8
Comments
I will confirm these issue, thanks |
@andersc can you outline the neccessary fixes? we also used a fork and are restrcutruring a bit. also your code seems to have moved into a repo which has no shared history with this one, so its hard to merge |
I just checked, the only use of string is in PMTElementInfo, should that be replaces by vector or such? |
@maddanio I made so many changes to the original repo it's not possible for me to be that specific. Just fork my clone to get to where I'm at -> https://github.com/Unit-X/mpegts Then just pullrequest from there. /Anders |
Ok, i tried porting your unit tests, but I think its too hard, so i switched to your fork. One thing: in both versions the demuxer is sensitive to the block size it is fed. Basically the simple buffer borders must somehow align with the demuxer granularity, otherwise things just fail oddly. I would advice a streaming input here, i.e. either an std istream or a callback. Easiest would likely be the latter, and then plug that into simple buffer. |
OK. Great you found a bug. Would it be possible for you to write a failing unit test? Then I'll fix it. Or provide more detailed information. |
Hmm, thats tricky, I think you kinda assert that packet size is divisible by 188 in your tests, which seems to be a magic number. its kinda obvious though that it is fragile like that, as the demuxer very rarely checks for emptiness of the buffer, i.e. it being used up, but happily reads from it the rest of the time. in debug mode that will probably trigger the assertions in the simple buffer |
let me try... |
Just want to let you know that I fixed a bunch of errors in the multiplexer and demux in my fork if you want to fix in your project.
Fixes here -> My fork
In general..
Using std::string to work with binary (non string) data is a bad idea
The PES Header is destroyed in some cases
The data is corrupt when building some size PES frames..
If you run the unit tests I made you will catch all of the errors that I found so far..
I also added mBroken to indicate broken PES frames.
You can close this at any time.. This is the only way for me to make you aware of the errors since we decided not to merge my fork earlier I can't create pull requests.
/Anders
The text was updated successfully, but these errors were encountered: