[Ffmpeg-devel] corrupt audio when cut [SOLVED]
Michael Niedermayer
michaelni
Sun Feb 4 04:25:45 CET 2007
Hi
On Sat, Feb 03, 2007 at 04:31:18PM -0000, Wolfram Gloger wrote:
> Hi,
>
> > --- ./data/libav.regression 2007-01-30 19:21:18.000000000 +0100
> > +++ /home/michael/ffmpeg-svn-tmp/trunk/tests/libav.regression.ref 2007-01-2=
> > 1 13:57:27.000000000 +0100
> > @@ -9,10 +9,10 @@
> > 355405 ./data/b-libav.rm
> > bdb7484c68db722f66ba1630cf79844c *./data/b-libav.mpg
> > 378880 ./data/b-libav.mpg
> > -./data/b-libav.mpg CRC=3D0x00000001
> > +./data/b-libav.mpg CRC=3D0x2b71a386
>
> I have investigated this thoroughly, and have a better patch now that
> passes regression tests. Also added a few comments.
>
> One-line-summary would be "make av_find_stream_info() usable
> anywhere within a file".
[...]
> -static void av_estimate_timings(AVFormatContext *ic)
> +/* returns non-zero if the packet queue was flushed */
> +static int av_estimate_timings(AVFormatContext *ic)
> {
> int64_t file_size;
> + int did_flush = 0;
>
> /* get the file size, if possible */
> if (ic->iformat->flags & AVFMT_NOFILE) {
> @@ -1672,6 +1672,7 @@
> file_size && !ic->pb.is_streamed) {
> /* get accurate estimate from the PTSes */
> av_estimate_timings_from_pts(ic);
> + did_flush = 1;
> } else if (av_has_timings(ic)) {
> /* at least one components has timings - we use them for all
> the components */
> @@ -1698,6 +1699,7 @@
> ic->bit_rate / 1000);
> }
> #endif
> + return did_flush;
> }
isnt it simplerto pass the old_offset into av_estimate_timings() and
do the seek in it instead of the did_flush return? or am i missing
something?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070204/80577f66/attachment.pgp>
More information about the ffmpeg-devel
mailing list