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

Kevin Kuphal kevin.kuphal at myrealbox.com
Fri Jan 9 02:41:41 EST 2004


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.

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.

Kevin Kuphal



-------------- next part --------------
A non-text attachment was scrubbed...
Name: avfseek.diff
Type: application/octet-stream
Size: 3536 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040109/af4d79bd/avfseek.obj


More information about the mythtv-dev mailing list