[mythtv] [patch] Improved seek support for WMA in MythMusic

Isaac Richards ijr at po.cwru.edu
Fri Jan 9 16:07:07 EST 2004


On Friday 09 January 2004 02:41 am, Kevin Kuphal wrote:
> This patch improves (well, implements really) the seek support in
> avfdecoder.cpp
>
> I found that the seeking would fail constantly after reading the first
> packet because the private data in libavformat for ASF files was never
> cleared (this condition might be true also for other formats).  This
> results in bad header information after the seek completes, specifically
> the use of some padding.  By closing and reopening the input file, these
> headers are reset and all seems well.  There seems to be no hit to
> performance doing this.  I tried simply freeing and reallocing the memory
> but that didn't do it so this will do for now.

This is a rather nasty hack -- think there's a chance of you finding what's 
wrong in libavformat soonish?

> Also, added a free_packet statement for good measure (even though the read
> frame is supposed to take care of that) and added a check not to look for
> the extended header information (album and track) if the data is retreived
> from the API since my libavformat patch to get the header info was accepted
> and theoretically could be on some systems.  Before this check, the album
> title would be duplicated (TenTen) if the updated library was installed.

mythmusic will _only_ link against the libavformat that's installed by mythtv, 
so I'll probably end up removing the parsing parts entirely once I get around 
to updating mythtv's version of libavformat to their current CVS tree.

Isaac


More information about the mythtv-dev mailing list