[mythtv] Is AvFormatDecoder::GetFrame(-1) broken?
bolek-mythtv at curl.com
Tue Jan 10 02:43:24 UTC 2006
Boleslaw Ciesielski wrote:
> It seems that AvFormatDecoder::GetFrame(-1) is not returning after the
> next frame but only after the entire file is read. This isn't the right
> behavior, is it? This affects for example
> NuppelVideoPlayer::RebuildSeekTable which does not display any progress
> messages because of it.
> Assuming that this is wrong, I tried the following patch:
> --- libs/libmythtv/avformatdecoder.cpp (revision 8519)
> +++ libs/libmythtv/avformatdecoder.cpp (working copy)
> @@ -2483,6 +2483,7 @@
> if (onlyvideo < 0)
> + gotvideo = 1;
> ptr += pkt->size;
> len -= pkt->size;
> This fixes the problem, but I am not sure if it's right.
Does any one have comments about this? I do think this is a real bug.
AFAICT, it affects two things:
1. "mythcommflag --rebuild" does not show progress (and it does with the
patch above). Ironically, NuppelVideoPlayer::RebuildSeekTable still
works because all it has to do is read the entire file (which the first
call to GetFrame(-1) does).
2. FF beyond the end of the position map seems to be affected but I am
not sure how to provoke it. It seems that it may not work because of the
// Re-enable rawframe state if it was enabled before FF
getrawframes = oldrawstate;
ateof would be true because GetFrame(-1) read the whole file.
I could create a ticket for this but it's just a one liner and more
importantly I am still not sure if the proposed patch is the right fix.
Should I do it anyway?
More information about the mythtv-dev