[mythtv] FFmpeg mediacodec problem

Peter Bennett pb.mythtv at gmail.com
Fri Jun 15 03:44:08 UTC 2018



On 06/14/2018 03:52 PM, Aman Gupta wrote:
> For codecs that deinterlace, you need to ensure you drain all frames 
> before feeding a new packet. So your worker loop should call receive() 
> in a loop until EAGAIN, then call send() until EAGAIN.
>
> This mimics how Google uses MediaCodec 
> (https://github.com/google/ExoPlayer/blob/000f3f23056aae30a98ac74fb30e484844548b3e/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java#L573-L574) 
> and if you don't do the same then weird issues can crop up.
>
Aman

The same routine is used for all decoder types (software, mediacodec, 
vdpau, etc.). Is it OK to do it this way for all types? It should be 
fine based on the documentation, but I just want to check with you in 
case there are problems that may come from other decoders if doing it 
this way.

Peter


More information about the mythtv-dev mailing list