[Libav-user] Unable to decode H.264 stream received via RTMP

Григорий grishka93 at gmail.com
Wed Apr 25 14:52:36 CEST 2012


Hi all.
I've built libffmpeg for Android and am trying to decode H.264 stream  
using it. I'm receiving that stream via RTMP connection and passing all  
video packets (excluding first byte that contains flags related to RTMP)  
to the avcodec_decode_video2 function. With H.263 it works perfectly, but  
when I try to use the same code (only with codec ID changed) for H.264,  
every call to avcodec_decode_video2 returns -1 and nothing gets decoded.
Here is the output:
err{or,}_recognition separate: 1211292404; 815C2A60
err{or,}_recognition combined: 1211292404; 815C2A60
non-existing PPS 1211291692 referenced
decode_slice_header error
no frame!
non-existing PPS 1211291732 referenced
decode_slice_header error
no frame!
...and it says "no frame!" for each frame I try to decode.
What am I doing wrong? I can also provide dump of the raw stream if needed.


More information about the Libav-user mailing list