diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-18 23:12:35 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-18 23:39:42 +0100 |
commit | bae053fca4cf662a223821f1e1fe43236e1cf2ff (patch) | |
tree | 0a3c448cd41c5beaaae48a6a61430c9d6277bb7f /libavformat | |
parent | 7f4c5ab8a1cc5e7be8ce70edfcaa6f926791376b (diff) | |
parent | a56fba502e9087c204b7d6cdc8e12d623f77d66d (diff) | |
download | ffmpeg-bae053fca4cf662a223821f1e1fe43236e1cf2ff.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
fate: make compare() function compatible with POSIX bc
Update Janne's email address.
APIchanges: Replace Subversion revision numbers by Git hashes.
bytestream: Eliminate one level of pointless macro indirection.
xwd: convert to bytestream2.
vqavideo: port to bytestream2 API
Read preset files with suffix .avpreset
prores: allow user to set fixed quantiser
lavf: remove some disabled code.
lavf: only set average frame rate for video.
lavf: remove a pointless check.
avcodec: add XBM encoder
Conflicts:
Changelog
cmdutils.c
cmdutils.h
doc/APIchanges
libavcodec/Makefile
libavcodec/avcodec.h
libavcodec/version.h
libavcodec/vqavideo.c
libavformat/img2enc.c
libavformat/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/img2.c | 1 | ||||
-rw-r--r-- | libavformat/img2enc.c | 2 | ||||
-rw-r--r-- | libavformat/utils.c | 44 |
3 files changed, 6 insertions, 41 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c index 86c5866060..b23e944809 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -71,6 +71,7 @@ static const IdStrMap img_tags[] = { { CODEC_ID_JPEG2000 , "jpc"}, { CODEC_ID_DPX , "dpx"}, { CODEC_ID_PICTOR , "pic"}, + { CODEC_ID_XBM , "xbm"}, { CODEC_ID_XWD , "xwd"}, { CODEC_ID_NONE , NULL} }; diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c index 9b4b30e814..175b854b6a 100644 --- a/libavformat/img2enc.c +++ b/libavformat/img2enc.c @@ -153,7 +153,7 @@ AVOutputFormat ff_image2_muxer = { .long_name = NULL_IF_CONFIG_SMALL("image2 sequence"), .extensions = "bmp,dpx,jls,jpeg,jpg,ljpg,pam,pbm,pcx,pgm,pgmyuv,png," "ppm,sgi,tga,tif,tiff,jp2,j2c,xwd,sun,ras,rs,im1,im8,im24," - "sunras", + "sunras,xbm", .priv_data_size = sizeof(VideoMuxData), .video_codec = CODEC_ID_MJPEG, .write_header = write_header, diff --git a/libavformat/utils.c b/libavformat/utils.c index fa1cd135b9..a917b4269d 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1749,14 +1749,6 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, static int seek_frame_byte(AVFormatContext *s, int stream_index, int64_t pos, int flags){ int64_t pos_min, pos_max; -#if 0 - AVStream *st; - - if (stream_index < 0) - return -1; - - st= s->streams[stream_index]; -#endif pos_min = s->data_offset; pos_max = avio_size(s->pb) - 1; @@ -1766,9 +1758,6 @@ static int seek_frame_byte(AVFormatContext *s, int stream_index, int64_t pos, in avio_seek(s->pb, pos, SEEK_SET); -#if 0 - av_update_cur_dts(s, st, ts); -#endif return 0; } @@ -2593,10 +2582,6 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) } for(i=0;i<ic->nb_streams;i++) { st = ic->streams[i]; - if (st->codec_info_nb_frames>2 && !st->avg_frame_rate.num && st->info->codec_info_duration) - av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den, - (st->codec_info_nb_frames-2)*(int64_t)st->time_base.den, - st->info->codec_info_duration*(int64_t)st->time_base.num, 60000); if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_coded_sample){ uint32_t tag= avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt); @@ -2604,6 +2589,10 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) st->codec->codec_tag= tag; } + if (st->codec_info_nb_frames>2 && !st->avg_frame_rate.num && st->info->codec_info_duration) + av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den, + (st->codec_info_nb_frames-2)*(int64_t)st->time_base.den, + st->info->codec_info_duration*(int64_t)st->time_base.num, 60000); // the check for tb_unreliable() is not completely correct, since this is not about handling // a unreliable/inexact time base, but a time base that is finer than necessary, as e.g. // ipmovie.c produces. @@ -2674,31 +2663,6 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) compute_chapters_end(ic); -#if 0 - /* correct DTS for B-frame streams with no timestamps */ - for(i=0;i<ic->nb_streams;i++) { - st = ic->streams[i]; - if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { - if(b-frames){ - ppktl = &ic->packet_buffer; - while(ppkt1){ - if(ppkt1->stream_index != i) - continue; - if(ppkt1->pkt->dts < 0) - break; - if(ppkt1->pkt->pts != AV_NOPTS_VALUE) - break; - ppkt1->pkt->dts -= delta; - ppkt1= ppkt1->next; - } - if(ppkt1) - continue; - st->cur_dts -= delta; - } - } - } -#endif - find_stream_info_err: for (i=0; i < ic->nb_streams; i++) { if (ic->streams[i]->codec) |