GNOME Bugzilla – Bug 723595
rtpvp8depay: small packets incorrectly dropped?
Last modified: 2014-06-19 15:15:53 UTC
When using the VP8 codec, small packets are dropped resulting in that the video quality is degraded. Looking at the code the size check on line 144 looks suspicious. We are using streamer 1.0.10 and would appreciate a backport of a solution.
Do you have a testcase for this? Backports to 1.0 are not done anymore, but whatever change is necessary here should be easy to backport from 1.2 to 1.0 yourself.
GST_DEBUG="rtpvp8depay:6" gst-launch-1.0 videotestsrc ! video/x-raw, width=640, height=480 ! vp8enc ! rtpvp8pay mtu=1280 ! rtpvp8depay ! fakesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Redistribute latency... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock 0:00:02.635242149 16184 0x1ef41e0 LOG rtpvp8depay gstrtpvp8depay.c:195:gst_rtp_vp8_depay_process:<rtpvp8depay0> Invalid rtp packet (too small), ignoring ...
I get this as well after a couple of seconds with 1.0, but not with 1.2 or git master. Not sure what might have fixed it though.
The bug can be reproduced on git master using the following command: GST_DEBUG="rtpvp8depay:6" gst-launch-1.0 videotestsrc pattern=black ! video/x-raw,width=640,height=480 ! vp8enc target-bitrate=1000000 ! rtpvp8pay picture-id-mode=7-bit mtu=61 ! rtpvp8depay ! fakesink
Confirmed, thanks for the pipeline to reproduce it.
commit 8a78fa1ff5a4e1a620cb1e0747e5b560bf4e8b80 Author: Wim Taymans <wtaymans@redhat.com> Date: Thu Jun 19 15:25:01 2014 +0200 vp8depay: fix header size checking Use a different variable name to make it clear that we are calculating the header size. Correctly check that we have enough bytes to read the header bits. We were checking if there were 5 bytes available in the header while we only needed 3, causing the packet to be discarded as too small. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=723595