[Bug 732631] Missing frames when encoding 16x16 video to MPEG4/MPEG2/H264
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Jul 2 09:30:08 PDT 2014
https://bugzilla.gnome.org/show_bug.cgi?id=732631
GStreamer | gst-libav | git
--- Comment #5 from Vincent Penquerc'h <vincent.penquerch at collabora.co.uk> 2014-07-02 16:30:04 UTC ---
At least for MPEG4, it seems that there is exactly as much space in the s->pb
bitbuffer as the maximum size of a MB (which is presumably 16x16). The first
loop shows there is something already in that buffer, so there is no space left
for the theoretical max size of the only MB to write.
When encoding a frame with more than 1 MB, I think the actual encoded size of
the first MB is less than max-mb-size minus whatever was there in the s->pb
buffer before starting encoding MBs, so the check never triggers. However, it
would likely trigger if all the MBs before the last one were somehow encoded at
the max size.
So, to fix this, I think we need to figure out the max amount of data that can
be written in s->pb before starting encoding MBs (probably some kind of frame
header), and ensure s->pb is initialized with that much space extra.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list