[FFmpeg-trac] #7687(avcodec:new): h264_omx can stall due to not handling fragmented frames correctly

FFmpeg trac at avcodec.org
Thu Jan 17 19:48:55 EET 2019


#7687: h264_omx can stall due to not handling fragmented frames correctly
---------------------------------------+-----------------------------------
             Reporter:  6by9           |                    Owner:
                 Type:  defect         |                   Status:  new
             Priority:  normal         |                Component:  avcodec
              Version:  git-master     |               Resolution:
             Keywords:  h264_omx, omx  |               Blocked By:
             Blocking:                 |  Reproduced by developer:  0
Analyzed by developer:  0              |
---------------------------------------+-----------------------------------

Comment (by 6by9):

 Increasing the number of buffers is even simpler with something like
 {{{
 diff --git a/libavcodec/omx.c b/libavcodec/omx.c
 index e813362..1f99917 100644
 --- a/libavcodec/omx.c
 +++ b/libavcodec/omx.c
 @@ -501,7 +501,9 @@ static av_cold int omx_component_init(AVCodecContext
 *avctx, const char *role)
          out_port_params.format.video.eCompressionFormat =
 OMX_VIDEO_CodingMPEG4;
      else if (avctx->codec->id == AV_CODEC_ID_H264)
          out_port_params.format.video.eCompressionFormat =
 OMX_VIDEO_CodingAVC;
 +#if CONFIG_OMX_RPI
 +    out_port_params.nBufferCountActual = 3;
 +#endif

      err = OMX_SetParameter(s->handle, OMX_IndexParamPortDefinition,
 &out_port_params);
      CHECK(err);
      err = OMX_GetParameter(s->handle, OMX_IndexParamPortDefinition,
 &out_port_params);
 }}}
 but that only reduces the chances of hitting the issue (admittedly to very
 very slim) rather than actually solving it.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7687#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list