H264: decode series of nal units with ffmpeg

前端 未结 2 554
渐次进展
渐次进展 2021-02-04 21:55

I tried to decode a series of nal units with ffmpeg (libavcodec) but I get a \"no frame\" error. I produced the nal units with the guideline at How does one encode a series of i

2条回答
  •  情话喂你
    2021-02-04 22:27

    Try this after the codec context instantiation code:

      if(pCodec->capabilities & CODEC_CAP_TRUNCATED)
          pCodecContext->flags |= CODEC_FLAG_TRUNCATED; /* We may send incomplete frames */
      if(pCodec->capabilities & CODEC_FLAG2_CHUNKS)
          pCodecContext->flags2 |= CODEC_FLAG2_CHUNKS;
    

提交回复
热议问题