[FFmpeg-soc] [soc]: r4612 - in concat: ffmpeg.c.diff upstreamrev
gkovacs
subversion at mplayerhq.hu
Sun Jul 5 08:08:47 CEST 2009
Author: gkovacs
Date: Sun Jul 5 08:08:47 2009
New Revision: 4612
Log:
listing corresponding upstream revision
Modified:
concat/ffmpeg.c.diff
concat/upstreamrev
Modified: concat/ffmpeg.c.diff
==============================================================================
--- concat/ffmpeg.c.diff Sun Jul 5 08:08:08 2009 (r4611)
+++ concat/ffmpeg.c.diff Sun Jul 5 08:08:47 2009 (r4612)
@@ -1,5 +1,5 @@
diff --git a/ffmpeg.c b/ffmpeg.c
-index 22bfed8..d7294c3 100644
+index 22bfed8..cfbc87a 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -70,6 +70,8 @@
@@ -131,24 +131,69 @@ index 22bfed8..d7294c3 100644
AVFormatContext *ic;
AVFormatParameters params, *ap = ¶ms;
int err, i, ret, rfps, rfps_base;
-@@ -2859,6 +2893,16 @@ static void opt_input_file(const char *filename)
+@@ -2859,6 +2893,43 @@ static void opt_input_file(const char *filename)
using_stdin |= !strncmp(filename, "pipe:", 5) ||
!strcmp(filename, "/dev/stdin");
++
+ if (concatenate_video_files) { // need to specify -conc before -i
++ int filenamelen = strlen(filename);
+ if (!playlist_ctx) {
++ ic = av_malloc(sizeof(*ic));
++// ic = avformat_alloc_context();
+ printf("need to generate playlist ctx\n");
+ playlist_ctx = ff_playlist_make_context(filename);
++ playlist_ctx->pelist_size = 1;
++ playlist_ctx->pelist = av_malloc(playlist_ctx->pelist_size * sizeof(*(playlist_ctx->pelist)));
++ memset(playlist_ctx->pelist, 0, playlist_ctx->pelist_size * sizeof(*(playlist_ctx->pelist)));
++ playlist_ctx->flist = av_malloc(playlist_ctx->pelist_size * sizeof(*(playlist_ctx->flist)));
++ playlist_ctx->flist[0] = av_malloc(sizeof(char) * (filenamelen+1));
++ av_strlcpy(playlist_ctx->flist[0], filename, filenamelen+1);
++ av_strlcpy(ic->filename, filename, sizeof(ic->filename));
++ ic->nb_streams = 2;
++ ic->iformat = concat_make_demuxer();
++ ic->priv_data = playlist_ctx;
++ for (i = 0; i < playlist_ctx->pe_curidxs_size; ++i) {
++ ff_playlist_populate_context(playlist_ctx, ic, i);
++ }
+ nb_input_files = 1;
-+ input_files[nb_input_files] = ic;
++ input_files[0] = ic;
++ goto configcodecs;
++ }
++ else {
++ printf("adding new file to playlist\n");
++ ++playlist_ctx->pelist_size;
++ playlist_ctx->pelist = av_realloc(playlist_ctx->pelist, playlist_ctx->pelist_size * sizeof(*(playlist_ctx->pelist)));
++ playlist_ctx->flist = av_realloc(playlist_ctx->flist, playlist_ctx->pelist_size);
++ playlist_ctx->flist[playlist_ctx->pelist_size-1] = av_malloc(sizeof(char) * (filenamelen+1));
++ av_strlcpy(playlist_ctx->flist[playlist_ctx->pelist_size-1], filename, filenamelen+1);
+ }
+ return;
+ }
+
++
/* get default parameters from command line */
ic = avformat_alloc_context();
-@@ -3874,6 +3918,7 @@ static const OptionDef options[] = {
+@@ -2925,6 +2996,8 @@ static void opt_input_file(const char *filename)
+ start_time = 0;
+ }
+
++ configcodecs:
++
+ /* update the current parameters so that they match the one of the input stream */
+ for(i=0;i<ic->nb_streams;i++) {
+ AVCodecContext *enc = ic->streams[i]->codec;
+@@ -3000,6 +3073,8 @@ static void opt_input_file(const char *filename)
+ dump_format(ic, nb_input_files, filename, 0);
+
+ nb_input_files++;
++ if (concatenate_video_files)
++ nb_input_files = 1;
+ file_iformat = NULL;
+ file_oformat = NULL;
+
+@@ -3874,6 +3949,7 @@ static const OptionDef options[] = {
{ "programid", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&opt_programid}, "desired program number", "" },
{ "xerror", OPT_BOOL, {(void*)&exit_on_error}, "exit on error", "error" },
{ "copyinkf", OPT_BOOL | OPT_EXPERT, {(void*)©_initial_nonkeyframes}, "copy initial non-keyframes" },
Modified: concat/upstreamrev
==============================================================================
--- concat/upstreamrev Sun Jul 5 08:08:08 2009 (r4611)
+++ concat/upstreamrev Sun Jul 5 08:08:47 2009 (r4612)
@@ -1,2 +1,5 @@
-
-
+svn: 19346
+git: 2c73d654f72a730705996039d7e3d83da80e2a4c
+committer: lorenm
+commitdate: Sat, 4 Jul 2009 23:59:10 +0000
+commitlog: fix a buffer overrun on corrupt huffyuv streams
More information about the FFmpeg-soc
mailing list