[Ffmpeg-devel] [PATCH] Reload stream parameters after initial seek in ffmpeg
Wolfram Gloger
wmglo
Sun Feb 18 22:01:53 CET 2007
Sorry for not following up earlier on the seek issue.
I'm trying to split my patch further.
Now that av_find_stream_info() is callable anywhere within a stream,
the following patch lets it be invoked after the initial seek. This
is definitely necessary for mpeg-ts which can contain completely
different stream/codec parameters in different parts of a stream.
Regards,
Wolfram.
--- trunk/ffmpeg.c Sat Feb 17 12:24:51 2007
+++ ffmpeg-wg/ffmpeg.c Sun Feb 18 12:27:44 2007
@@ -2589,6 +2616,12 @@
}
/* reset seek info */
start_time = 0;
+ /* reload stream parameters */
+ ret = av_find_stream_info(ic);
+ if (ret < 0 && verbose >= 0) {
+ fprintf(stderr, "%s: could not find codec parameters\n", filename);
+ exit(1);
+ }
}
/* update the current parameters so that they match the one of the input stream */
More information about the ffmpeg-devel
mailing list