[FFmpeg-soc] [soc]: r4846 - in concat/libavformat: concatgen.c playlist.c
gkovacs
subversion at mplayerhq.hu
Fri Jul 31 01:32:56 CEST 2009
Author: gkovacs
Date: Fri Jul 31 01:32:56 2009
New Revision: 4846
Log:
setting duration and cur_st in AVFormatContext; chained concat demuxers should now work
Modified:
concat/libavformat/concatgen.c
concat/libavformat/playlist.c
Modified: concat/libavformat/concatgen.c
==============================================================================
--- concat/libavformat/concatgen.c Fri Jul 31 01:27:40 2009 (r4845)
+++ concat/libavformat/concatgen.c Fri Jul 31 01:32:56 2009 (r4846)
@@ -34,8 +34,7 @@
int ff_concatgen_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
- int ret;
- int stream_index;
+ int ret, i, stream_index;
PlaylistContext *ctx;
AVFormatContext *ic;
char have_switched_streams = 0;
@@ -68,6 +67,9 @@ int ff_concatgen_read_packet(AVFormatCon
ff_playlist_populate_context(ctx, ctx->pe_curidx);
ff_playlist_set_streams(s);
have_switched_streams = 1;
+ s->duration = 0;
+ for (i = 0; i < ctx->pe_curidx; ++i)
+ s->duration += ctx->durations[i];
continue;
} else {
av_log(ic, AV_LOG_ERROR, "Packet read error %d\n", ret);
Modified: concat/libavformat/playlist.c
==============================================================================
--- concat/libavformat/playlist.c Fri Jul 31 01:27:40 2009 (r4845)
+++ concat/libavformat/playlist.c Fri Jul 31 01:32:56 2009 (r4846)
@@ -63,6 +63,7 @@ void ff_playlist_set_streams(AVFormatCon
s->nb_streams = ic->nb_streams;
for (i = 0; i < ic->nb_streams; ++i)
s->streams[i] = ic->streams[i];
+ s->cur_st = ic->cur_st;
s->packet_buffer = ic->packet_buffer;
s->packet_buffer_end = ic->packet_buffer_end;
}
More information about the FFmpeg-soc
mailing list