[mythtv] Seg Fault in mediacodec

David Engel david at istwok.net
Wed Jul 4 16:20:47 UTC 2018


On Wed, Jul 04, 2018 at 11:27:55AM -0400, Aman Gupta wrote:
> On Tue, Jul 3, 2018 at 11:35 AM David Engel <david at istwok.net> wrote:
> 
> > On Tue, Jul 03, 2018 at 10:37:04AM -0400, Peter Bennett wrote:
> > >
> > >
> > > On 07/02/2018 09:38 PM, David Engel wrote:
> > > > On Mon, Jul 02, 2018 at 05:14:52PM -0400, Aman Gupta wrote:
> > > > > On Mon, Jul 2, 2018 at 3:58 PM Peter Bennett <pb.mythtv at gmail.com>
> > wrote:
> > > > > > Hi Aman
> > > > > >
> > > > > > Thank you for all your help so far.
> > > > > >
> > > > > > I upgraded my Shield to Android 8.0. Now I get a seg fault every
> > time I
> > > > > > play 1080 interlaced recordings. Progressive recordings are fine,
> > and
> > > > > > 480 interlaced are fine. Also 4K recordings are fine. With 1080
> > > > > > interlaced it gets a seg fault in avcodec_receive_frame. This
> > happens at
> > > > > > about the fifth frame received in the video. It starts off fine,
> > with
> > > > > > avcodec_receive_frame returning EAGAIN until some number of
> > packets have
> > > > > > been sent, then it receives a few frames, then there is a seg
> > fault in
> > > > > > memcpy. There are no null addresses being passed to memcpy, but
> > > > > > something must be invalid. This was working fine with Android 7. I
> > am
> > > > > > using the default buffer allocation: AVCodecContext->get_buffer2 =
> > > > > > get_avf_buffer. avcodec_receive_frame should allocate the buffers
> > using
> > > > > > that routine so they should be valid.
> > > > > >
> > > > > > [backtrace snipped]
> > > > > >
> > > > > You can try the mpv-android apk from GitHub to compare. I'm pretty
> > sure it
> > > > > works fine on Oreo.
> > > > mpv-android almost always crashes for me after a split second on 1080i
> > > > content.  When it doesn't crash, it just exits playback, also after a
> > > > split second.  720p content works fine, just like with MythTV.
> > > >
> > > > David
> > > Thank you for doing that test.
> > >
> > > This indicates the problem is somewhere in ffmpeg rather than mythtv
> > code. I
> > > don't know what the trigger is, interlaced video or mpeg2 video, but it
> > does
> > > not affect 480 interlaced mpeg2 video.
> >
> > I have a few channels using 1080i and h.264 encoding.  It happens with
> > recordings from them as well.
> 
> 
> I'm traveling and don't have access to my devices to try this myself, but
> it sounds like a regression in the copy based decoder. Would be useful to
> know if the same issue occurs on an Oreo MiBox to narrow down the
> regression to Oreo itself vs Nvidia.

This probably isn't the best test, but here's what I get on my phone
running Oreo 8.1.  720p plays.  480i hangs.  1080i hangs and then
causes a reboot when trying to exit to home.

David
-- 
David Engel
david at istwok.net


More information about the mythtv-dev mailing list