[gst-devel] seeking
David I. Lehn
dlehn at vt.edu
Mon Sep 17 09:38:03 CEST 2001
* vishnu at pobox.com <vishnu at pobox.com> [20010917 04:12]:
> i'm trying to seek around an mpeg2 vob file. Video works great, but
> audio tends to get messed up after about 20-30 seeks.
>
> i'm not talking about the obvious lack of good a/v sync. This is
> worse. i get lots of these:
>
> a52dec a52_block error 4
> a52dec a52_block error 5
> a52dec a52_block error 1
> a52dec a52_block error 2
> a52dec a52_block error 3
> a52dec a52_block error 4
> a52dec a52_block error 5
> a52dec a52_block error 1
> ...
>
> There must be a way to do a reliable seek. Can you speculate on
> the cause here?
>
In theory the code should be able to resync to proper frame boundries.
It does this by a simple check byte-by-byte until it finds what looks
like the proper header. I don't know if the format bans those sync
codes in the rest of the data stream or not. If not then I guess it
could be seeking to some location, not finding a proper header, doing a
search, and stopping at the wrong spot. That error message is cause the
block call is working for the first block and failing for the other 5.
(in a frame). I'm going to take a guess here: in the loop func reset
(memset to 0) the state struct on every frame rather than just once. I
was getting those errors before due to not setting the state struct to 0
(g_new0) at the beginning (some bug in a52dec).
-dave
--
David I. Lehn <dlehn at vt.edu> | http://www.lehn.org/~dlehn/
Computer Engineering Graduate @ Virginia Tech in sunny Blacksburg, VA
More information about the gstreamer-devel
mailing list