[mythtv-commits] mythtv commit: r20321 by cpinkham

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Wed Apr 8 01:41:37 UTC 2009

      Author: cpinkham
        Date: 2009-04-08 01:41:37 +0000 (Wed, 08 Apr 2009)
New Revision: 20321
   Changeset: http://cvs.mythtv.org/trac/changeset/20321




Initialize (URLContext*)->priv_data in AVF_Open() in case one of the other
AVF_* functions gets called before we can allocate a AVFRingBuffer and
assign it.  This can happen if we use libavformat/aviobuf.c's url_fopen()
which calls avio.c's url_open() which calls url_open_protocol().
The URLContext isn't allocated until url_open_protocol() gets called, but
url_open_protocol immediately tries to do a url_seek() (aka AVF_Seek())
which depend(s|ed) on priv_data already being pointed to an AVFRingBuffer.

The bug didn't affect current usage, but showed up as a segfault when
writing files using libavformat via our RingBuffer class.

References #2972.

More information about the mythtv-commits mailing list