[FFmpeg-soc] [soc]: r4970 - in concat/libavformat: concatgen.c concatgen.h playlist.c playlist.h
gkovacs
subversion at mplayerhq.hu
Fri Aug 7 02:39:12 CEST 2009
Author: gkovacs
Date: Fri Aug 7 02:39:12 2009
New Revision: 4970
Log:
break long lines
Modified:
concat/libavformat/concatgen.c
concat/libavformat/concatgen.h
concat/libavformat/playlist.c
concat/libavformat/playlist.h
Modified: concat/libavformat/concatgen.c
==============================================================================
--- concat/libavformat/concatgen.c Fri Aug 7 01:40:31 2009 (r4969)
+++ concat/libavformat/concatgen.c Fri Aug 7 02:39:12 2009 (r4970)
@@ -57,12 +57,16 @@ int ff_concatgen_read_packet(AVFormatCon
}
break;
} else {
- if (!have_switched_streams && ctx->pe_curidx < ctx->pelist_size - 1 && ic->cur_st) {
+ if (!have_switched_streams &&
+ ctx->pe_curidx < ctx->pelist_size - 1 &&
+ ic->cur_st) {
// TODO switch from AVERROR_EOF to AVERROR_EOS
// -32 AVERROR_EOF for avi, -51 for ogg
av_log(ic, AV_LOG_DEBUG, "Switching stream %d to %d\n", stream_index, ctx->pe_curidx+1);
ctx->durations[ctx->pe_curidx] = ic->duration;
- ctx->pe_curidx = ff_playlist_stream_index_from_time(ctx, ff_playlist_time_offset(ctx->durations, ctx->pe_curidx), NULL);
+ ctx->pe_curidx = ff_playlist_stream_index_from_time(ctx,
+ ff_playlist_time_offset(ctx->durations, ctx->pe_curidx),
+ NULL);
ff_playlist_populate_context(ctx, ctx->pe_curidx);
ff_playlist_set_streams(s);
// have_switched_streams is set to avoid infinite loop
@@ -93,12 +97,18 @@ int ff_concatgen_read_seek(AVFormatConte
ctx = s->priv_data;
ic = ctx->icl[ctx->pe_curidx];
ctx->durations[ctx->pe_curidx] = ic->duration;
- pts_avtimebase = av_rescale_q(pts, ic->streams[stream_index]->time_base, AV_TIME_BASE_Q);
- ctx->pe_curidx = ff_playlist_stream_index_from_time(ctx, pts_avtimebase, &localpts_avtimebase);
+ pts_avtimebase = av_rescale_q(pts,
+ ic->streams[stream_index]->time_base,
+ AV_TIME_BASE_Q);
+ ctx->pe_curidx = ff_playlist_stream_index_from_time(ctx,
+ pts_avtimebase,
+ &localpts_avtimebase);
ff_playlist_populate_context(ctx, ctx->pe_curidx);
ff_playlist_set_streams(s);
ic = ctx->icl[ctx->pe_curidx];
- localpts = av_rescale_q(localpts_avtimebase, AV_TIME_BASE_Q, ic->streams[stream_index]->time_base);
+ localpts = av_rescale_q(localpts_avtimebase,
+ AV_TIME_BASE_Q,
+ ic->streams[stream_index]->time_base);
s->duration = 0;
for (i = 0; i < ctx->pe_curidx; ++i)
s->duration += ctx->durations[i];
Modified: concat/libavformat/concatgen.h
==============================================================================
--- concat/libavformat/concatgen.h Fri Aug 7 01:40:31 2009 (r4969)
+++ concat/libavformat/concatgen.h Fri Aug 7 02:39:12 2009 (r4970)
@@ -26,7 +26,10 @@
int ff_concatgen_read_packet(AVFormatContext *s, AVPacket *pkt);
-int ff_concatgen_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags);
+int ff_concatgen_read_seek(AVFormatContext *s,
+ int stream_index,
+ int64_t pts,
+ int flags);
int64_t ff_concatgen_read_timestamp(AVFormatContext *s,
int stream_index,
Modified: concat/libavformat/playlist.c
==============================================================================
--- concat/libavformat/playlist.c Fri Aug 7 01:40:31 2009 (r4969)
+++ concat/libavformat/playlist.c Fri Aug 7 02:39:12 2009 (r4970)
@@ -83,7 +83,10 @@ void ff_playlist_set_context(AVFormatCon
ic->priv_data = ctx;
}
-void ff_playlist_split_encodedstring(const char *s, const char sep, char ***flist_ptr, int *len_ptr)
+void ff_playlist_split_encodedstring(const char *s,
+ const char sep,
+ char ***flist_ptr,
+ int *len_ptr)
{
char c, *ts, **flist;
int i, len, buflen, *sepidx;
@@ -133,11 +136,14 @@ void ff_playlist_add_path(PlaylistContex
ctx->flist = av_realloc(ctx->flist, sizeof(*(ctx->flist)) * (++ctx->pelist_size+1));
ctx->flist[ctx->pelist_size] = NULL;
ctx->flist[ctx->pelist_size-1] = itempath;
- ctx->durations = av_realloc(ctx->durations, sizeof(*(ctx->durations)) * (ctx->pelist_size+1));
+ ctx->durations = av_realloc(ctx->durations,
+ sizeof(*(ctx->durations)) * (ctx->pelist_size+1));
ctx->durations[ctx->pelist_size] = 0;
}
-void ff_playlist_relative_paths(char **flist, const int len, const char *workingdir)
+void ff_playlist_relative_paths(char **flist,
+ const int len,
+ const char *workingdir)
{
int i;
for (i = 0; i < len; ++i) { // determine if relative paths
@@ -164,7 +170,9 @@ int64_t ff_playlist_time_offset(int64_t
return total;
}
-int ff_playlist_stream_index_from_time(PlaylistContext *ctx, int64_t pts, int64_t *localpts)
+int ff_playlist_stream_index_from_time(PlaylistContext *ctx,
+ int64_t pts,
+ int64_t *localpts)
{
int i;
int64_t total;
Modified: concat/libavformat/playlist.h
==============================================================================
--- concat/libavformat/playlist.h Fri Aug 7 01:40:31 2009 (r4969)
+++ concat/libavformat/playlist.h Fri Aug 7 02:39:12 2009 (r4970)
@@ -89,7 +89,9 @@ void ff_playlist_set_context(AVFormatCon
* @param len Number of paths in flist.
* @param workingdir Path that strings in flist are relative to.
*/
-void ff_playlist_relative_paths(char **flist, const int len, const char *workingdir);
+void ff_playlist_relative_paths(char **flist,
+ const int len,
+ const char *workingdir);
/** @fn void ff_playlist_split_encodedstring(char *s, char sep, char ***flist_ptr, int *len_ptr)
* @brief Splits a character-delimited string into a list of strings.
@@ -98,7 +100,10 @@ void ff_playlist_relative_paths(char **f
* @param flist_ptr Pointer to string list which will be allocated by function.
* @param len_ptr Number of segments the string was split into.
*/
-void ff_playlist_split_encodedstring(const char *s, const char sep, char ***flist_ptr, int *len_ptr);
+void ff_playlist_split_encodedstring(const char *s,
+ const char sep,
+ char ***flist_ptr,
+ int *len_ptr);
/** @fn PlaylistContext *ff_playlist_from_encodedstring(char *s, char sep)
* @brief Allocates and returns a PlaylistContext with playlist elements specified by a character-delimited string.
@@ -130,6 +135,8 @@ int64_t ff_playlist_time_offset(int64_t
* @param localpts Time in the local demuxer's timeframe in AV_TIME_BASE units; if null, not calculated.
* @return Returns the index of the stream which covers the specified time range.
*/
-int ff_playlist_stream_index_from_time(PlaylistContext *ctx, int64_t pts, int64_t *localpts);
+int ff_playlist_stream_index_from_time(PlaylistContext *ctx,
+ int64_t pts,
+ int64_t *localpts);
#endif /* AVFORMAT_PLAYLIST_H */
More information about the FFmpeg-soc
mailing list