[Libav-user] ffmpeg libstagefright init error: Malformed AVC codec specific data

Xiemin Chen chenxiemin at gmail.com
Mon Jul 28 16:41:24 CEST 2014

hi, all... I try to use hw decoder by libstagefright with Android but so
many mistakes frustrate me. I play ipcam rtsp stream with ffmpeg and I
refer to the following tutorial:

It will check extradata[0] first as following, but the extradata[0] for
ipcam rtsp stream is 0 instead of 1. If I commit the "if statement",
OMXCodec tells me the error message "Malformed AVC codec specific data."
when I call OMXCodec::Create().
    if (mVideoTrack->extradata[0] == 1) {
        mFormat->setData(kKeyAVCC, kTypeAVCC, mVideoTrack->extradata,
As far as I know that the extradata will store the sprop-parameter-sets
comes from sdp protocol. But I don't know why it checks the extradata[0]
and whether it's necessary. Can you please give me any instruction? Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140728/ccfdd3b6/attachment.html>

More information about the Libav-user mailing list