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 564501 - [rtph264pay] bytestream scan mode operation is not reliable
[rtph264pay] bytestream scan mode operation is not reliable
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal normal
: 0.10.16
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2008-12-14 17:07 UTC by 이문형
Modified: 2009-08-06 09:21 UTC
See Also:
GNOME target: ---
GNOME version: ---

fixes this bug (7.54 KB, patch)
2008-12-14 17:15 UTC, 이문형
none Details | Review
fixes not to push packets before caps updated (6.65 KB, patch)
2008-12-16 09:53 UTC, 이문형
none Details | Review
oops (6.64 KB, patch)
2008-12-16 10:04 UTC, 이문형
none Details | Review
Modified patch (7.16 KB, patch)
2009-06-17 14:13 UTC, Mark Nauwelaerts
committed Details | Review

Description 이문형 2008-12-14 17:07:41 UTC
Please describe the problem:
rtph264pay has following bugs:
- If SPS & PPS are in one payload, it fails to collect them. only first seen NAL is used for generating sprop_parameter_sets.
- constructor forgot to initialize variables properly :)

Steps to reproduce:

Actual results:

Expected results:

Does this happen every time?

Other information:
Comment 1 이문형 2008-12-14 17:15:37 UTC
Created attachment 124658 [details] [review]
fixes this bug

on more thing:
- do not update output caps until we receive both SPS and PPS.
Comment 2 이문형 2008-12-16 09:53:40 UTC
Created attachment 124778 [details] [review]
fixes not to push packets before caps updated

previous patch did allow packets pushed before we have analyzed all the NALS in one buffer.
This patch simply collects NALs, and push them at the end of the buffer processing.
Comment 3 이문형 2008-12-16 10:04:07 UTC
Created attachment 124781 [details] [review]

oops, some mistake;;
Comment 4 Wim Taymans 2008-12-17 10:28:00 UTC
I have some objections:

- please make a patch with diff -u
- The constructor in GObject initializes instance variables to 0 automatically.
- Creating and destroying the nal_queue for each packet is too slow. 
- casting the gint to a gpointer to add it to the queue is not portable and does
  not compile on my machine.

Surely there must be an easier way to delay setting the caps until both SPS and PPS are found, like with a simple flag or so... 
Comment 5 Mark Nauwelaerts 2009-06-17 14:13:54 UTC
Created attachment 136836 [details] [review]
Modified patch

Scan incoming bytestream buffer for SPS and PPS, then set caps, and only then push outgoing packets.
Comment 6 Tim-Philipp Müller 2009-08-01 19:12:54 UTC
Re-opening, since updated patch available now.

Is this something we should try to get into the upcoming -good release?

Is this something that could be reproduced with a quite small sample file by any chance? (if yes, I might whip up a unit test)
Comment 7 Wim Taymans 2009-08-06 09:21:47 UTC
commit 2bfb42c5f8ffec7fa15666b1e6072ae11700a427
Author: Mark Nauwelaerts <>
Date:   Mon Aug 3 18:55:19 2009 +0200

    rtph264pay: push NALs only after SPS/PPS
    parse complete (bytestream) buffer for SPS/PPS before pushing NALs.
    Fixes #564501.