-1

I use live555 to receive RTP video frame (frame encoded in H264). I use Live555 open my local .sdp file to receive frame data. I just saw DummySink::afterGettingFrame was called ceaselessly。 if fReceiveBuffer in DummySink is correct, Why FFMPEG cannot decode the frame? My code is wrong?

Here is my Code Snippet: http://paste.ubuntu.com/12529740/

the function avcodec_decode_video2 is always return failed , its value less than zero

fReceiveBuffer is present one video frame?

Oh, Here is my FFMPEG init code need to open related video decoder: http://paste.ubuntu.com/12529760/

MathxH Chen
  • 51
  • 1
  • 5

1 Answers1

0

I read the document related H264 again, I found out that I-frame(IDR) need SPS/PPS separated by 0x00000001 insert into the header and decoder have a capacity to decode the frame correctly. Here is a related solution FFmpeg can't decode H264 stream/frame data

Decoding h264 frames from RTP stream

and now, My App works fine, it can decode the frame and convert it to OSD Image for displaying to screen .

Community
  • 1
  • 1
MathxH Chen
  • 51
  • 1
  • 5