diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-09 00:24:29 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-09 00:24:29 +0000 |
commit | 3438d82d4b3bd987304975961e2a42e82767107d (patch) | |
tree | 75415491b9bdaa85530e8f3d639b67452bdc9989 /ffmpeg.c | |
parent | fbd971a444566844680f1eeb4efc501ba50233a0 (diff) | |
download | ffmpeg-3438d82d4b3bd987304975961e2a42e82767107d.tar.gz |
remove ugly ffm_nopts hack, use AVFormatContext->timestamp
Originally committed as revision 13718 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -427,6 +427,7 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename) { int i, err; AVFormatContext *ic; + int nopts = 0; err = av_open_input_file(&ic, filename, NULL, FFM_PACKET_SIZE, NULL); if (err < 0) @@ -442,8 +443,13 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename) st->codec = avcodec_alloc_context(); memcpy(st->codec, ic->streams[i]->codec, sizeof(AVCodecContext)); s->streams[i] = st; + if(st->codec->flags & CODEC_FLAG_BITEXACT) + nopts = 1; } + if (!nopts) + s->timestamp = av_gettime(); + av_close_input_file(ic); return 0; } @@ -2177,8 +2183,6 @@ static void opt_format(const char *arg) } } -extern int ffm_nopts; - static int opt_default(const char *opt, const char *arg){ int type; const AVOption *o= NULL; @@ -2210,12 +2214,6 @@ static int opt_default(const char *opt, const char *arg){ opt_names= av_realloc(opt_names, sizeof(void*)*(opt_name_count+1)); opt_names[opt_name_count++]= o->name; -#ifdef CONFIG_FFM_MUXER - /* disable generate of real time pts in ffm (need to be supressed anyway) */ - if(avctx_opts[0]->flags & CODEC_FLAG_BITEXACT) - ffm_nopts = 1; -#endif - if(avctx_opts[0]->debug) av_log_set_level(AV_LOG_DEBUG); return 0; |