After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 674202 - [videoparsers] MPEG 2 video parser does not split in complete frame
[videoparsers] MPEG 2 video parser does not split in complete frame
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.24
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-16 13:45 UTC by Nicolas Dufresne (ndufresne)
Modified: 2012-10-06 11:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicolas Dufresne (ndufresne) 2012-04-16 13:45:16 UTC
With current implementation, it seems that the mpeg parsers splits the stream into mpeg packet rather then group of packet that will result in 1 decoded frame.
Comment 1 Sebastian Dröge (slomo) 2012-04-17 07:20:46 UTC
The current behaviour of splitting into the MPEG packets might be useful to have but splitting into something like AUs would be at least useful as a new stream-format.
Comment 2 Nicolas Dufresne (ndufresne) 2012-05-09 14:28:59 UTC
Actually, it does split in complete frame, most of the time. What I observer is a broken frame (without discont !?! and before reset), right after a seek. That seems to be the real issue.
Comment 3 Sebastian Dröge (slomo) 2012-05-09 16:31:16 UTC
You might be right, for both mpeg4 and mpeg2. Could you check if the code does that too?

I'm quite sure that mpeg4videoparse at least used to not output complete frames some months ago.
Comment 4 Nicolas Dufresne (ndufresne) 2012-05-09 18:23:45 UTC
I've checked the code and mpeg4 parse split in complete frames.
Comment 5 Sebastian Dröge (slomo) 2012-05-11 11:06:59 UTC
Fixed by the patch in #672701 from my understanding... let's close this as a duplicate?
Comment 6 Mark Nauwelaerts 2012-05-21 13:15:23 UTC
I don't think that #672701 has to do with this.

However, it more seems like most of the parsing code in _check_valid_frame expects the frame to start at offset 0, but I don't see anything that actually enforces that (like skipping to the first start code).  That could lead to all sorts of confusion and initial broken frame stuff, particularly following a seek which is likely to end up at a non-startcode position (contrary to normal sequential scan).
Comment 7 Mark Nauwelaerts 2012-05-21 18:24:13 UTC
Continuing the above, following should handle some corner case misparsing so as not to end up with broken frames

commit e283460c784f7c5b98aaffa7c2ccbf4a722cfee4
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Mon May 21 19:22:19 2012 +0200

    mpegvideoparse: unobfuscate frame parsing
    
    ... and add comments and debug statements.
    
    Fixes #674202.
Comment 8 Mark Nauwelaerts 2012-05-21 18:33:49 UTC
[and in 0.11]

commit 1f0c18daf295b06cc9d8f285d47e49cf7cff389b
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Mon May 21 19:22:19 2012 +0200

    mpegvideoparse: unobfuscate frame parsing
    
    ... and add comments and debug statements.
    
    Fixes #674202.
    
    Conflicts:
    
        gst/videoparsers/gstmpegvideoparse.c