diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-02-04 02:14:54 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-02-04 02:34:14 +0100 |
commit | 3b46daa31f566f9c6ef1518c1767b12e0ab2f62a (patch) | |
tree | e0baf74dc919859429488d4ea73cfc92e96db414 /ffmpeg.c | |
parent | 670229ef4392fa88d6add97c0eef412a5d6083c0 (diff) | |
parent | 6f1a5e8d6b7e085171a49b8ce6a371a7c9643764 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
dsputil: remove debug message in dsputil_init().
movdec: Avoid av_malloc(0) in stss
build: Drop YASM-OBJS-FFT from SUBDIR_VARS.
build: Drop unused X86-OBJS variable.
avconv: remove debugging cruft from do_video_out().
avconv: factorize setting stream_index for the output packet.
frame{crc/md5}: set the stream timebase from codec timebase.
apedec: remove unneeded #include of get_bits.h and associated macro
apedec: av_fast_malloc() instead of av_realloc()
apedec: fix handling of packet sizes that are not a multiple of 4 bytes
Conflicts:
libavcodec/apedec.c
tests/ref/fate/4xm-1
tests/ref/fate/4xm-2
tests/ref/fate/aasc
tests/ref/fate/armovie-escape124
tests/ref/fate/bethsoft-vid
tests/ref/fate/cljr
tests/ref/fate/creatureshock-avs
tests/ref/fate/cscd
tests/ref/fate/cvid-partial
tests/ref/fate/deluxepaint-anm
tests/ref/fate/dfa1
tests/ref/fate/dfa10
tests/ref/fate/dfa11
tests/ref/fate/dfa2
tests/ref/fate/dfa3
tests/ref/fate/dfa4
tests/ref/fate/dfa5
tests/ref/fate/dfa6
tests/ref/fate/dfa7
tests/ref/fate/dfa8
tests/ref/fate/dfa9
tests/ref/fate/film-cvid-pcm-stereo-8bit
tests/ref/fate/flic-af11-palette-change
tests/ref/fate/flic-magiccarpet
tests/ref/fate/fraps-v2
tests/ref/fate/fraps-v3
tests/ref/fate/h264-lossless
tests/ref/fate/interplay-mve-16bit
tests/ref/fate/interplay-mve-8bit
tests/ref/fate/mimic
tests/ref/fate/motionpixels
tests/ref/fate/mpeg2-field-enc
tests/ref/fate/msvideo1-16bit
tests/ref/fate/mtv
tests/ref/fate/nuv
tests/ref/fate/pictor
tests/ref/fate/prores-alpha
tests/ref/fate/ptx
tests/ref/fate/qtrle-16bit
tests/ref/fate/qtrle-1bit
tests/ref/fate/quickdraw
tests/ref/fate/rpza
tests/ref/fate/sierra-vmd
tests/ref/fate/targa-conformance-CCM8
tests/ref/fate/targa-conformance-UCM8
tests/ref/fate/tiertex-seq
tests/ref/fate/truemotion1-15
tests/ref/fate/truemotion1-24
tests/ref/fate/tscc-15bit
tests/ref/fate/tscc-32bit
tests/ref/fate/v210
tests/ref/fate/vc1-ism
tests/ref/fate/vc1_sa00040
tests/ref/fate/vc1_sa00050
tests/ref/fate/vc1_sa10091
tests/ref/fate/vc1_sa20021
tests/ref/fate/vmnc-16bit
tests/ref/fate/vmnc-32bit
tests/ref/fate/vp5
tests/ref/fate/vp8-sign-bias
tests/ref/fate/vqa-cc
tests/ref/fate/wmv8-drm
tests/ref/fate/yop
tests/ref/fate/zmbv-8bit
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -1024,6 +1024,7 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost) bsfc = bsfc->next; } + pkt->stream_index = ost->index; ret = av_interleaved_write_frame(s, pkt); if (ret < 0) { print_error("av_interleaved_write_frame()", ret); @@ -1082,7 +1083,6 @@ static int encode_audio_frame(AVFormatContext *s, OutputStream *ost, ret = pkt.size; if (got_packet) { - pkt.stream_index = ost->index; if (pkt.pts != AV_NOPTS_VALUE) pkt.pts = av_rescale_q(pkt.pts, enc->time_base, ost->st->time_base); if (pkt.duration > 0) @@ -1363,7 +1363,6 @@ static void do_subtitle_out(AVFormatContext *s, } av_init_packet(&pkt); - pkt.stream_index = ost->index; pkt.data = subtitle_out; pkt.size = subtitle_out_size; pkt.pts = av_rescale_q(sub->pts, AV_TIME_BASE_Q, ost->st->time_base); @@ -1487,7 +1486,6 @@ static void do_video_out(AVFormatContext *s, ost->sync_opts = lrintf(sync_ipts); } else if (vdelta > 1.1) nb_frames = lrintf(vdelta); -//fprintf(stderr, "vdelta:%f, ost->sync_opts:%"PRId64", ost->sync_ipts:%f nb_frames:%d\n", vdelta, ost->sync_opts, get_sync_ipts(ost), nb_frames); if (nb_frames == 0) { ++nb_frames_drop; av_log(NULL, AV_LOG_VERBOSE, "*** drop!\n"); @@ -1508,7 +1506,6 @@ static void do_video_out(AVFormatContext *s, for (i = 0; i < nb_frames; i++) { AVPacket pkt; av_init_packet(&pkt); - pkt.stream_index = ost->index; if (s->oformat->flags & AVFMT_RAWPICTURE && enc->codec->id == CODEC_ID_RAWVIDEO) { @@ -1542,10 +1539,7 @@ static void do_video_out(AVFormatContext *s, big_picture.quality = quality; if (!enc->me_threshold) big_picture.pict_type = 0; -// big_picture.pts = AV_NOPTS_VALUE; big_picture.pts = ost->sync_opts; -// big_picture.pts= av_rescale(ost->sync_opts, AV_TIME_BASE*(int64_t)enc->time_base.num, enc->time_base.den); -// av_log(NULL, AV_LOG_DEBUG, "%"PRId64" -> encoder\n", ost->sync_opts); if (ost->forced_kf_index < ost->forced_kf_count && big_picture.pts >= ost->forced_kf_pts[ost->forced_kf_index]) { big_picture.pict_type = AV_PICTURE_TYPE_I; @@ -1566,9 +1560,6 @@ static void do_video_out(AVFormatContext *s, pkt.pts = av_rescale_q(ost->sync_opts, enc->time_base, ost->st->time_base); if (enc->coded_frame->pts != AV_NOPTS_VALUE) pkt.pts = av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base); -/*av_log(NULL, AV_LOG_DEBUG, "encoder -> %"PRId64"/%"PRId64"\n", - pkt.pts != AV_NOPTS_VALUE ? av_rescale(pkt.pts, enc->time_base.den, AV_TIME_BASE*(int64_t)enc->time_base.num) : -1, - pkt.dts != AV_NOPTS_VALUE ? av_rescale(pkt.dts, enc->time_base.den, AV_TIME_BASE*(int64_t)enc->time_base.num) : -1);*/ if (enc->coded_frame->key_frame) pkt.flags |= AV_PKT_FLAG_KEY; @@ -1577,8 +1568,7 @@ static void do_video_out(AVFormatContext *s, write_frame(s, &pkt, ost); *frame_size = ret; video_size += ret; - // fprintf(stderr,"\nFrame: %3d size: %5d type: %d", - // enc->frame_number-1, ret, enc->pict_type); + /* if two pass, output log */ if (ost->logfile && enc->stats_out) { fprintf(ost->logfile, "%s", enc->stats_out); @@ -1840,7 +1830,6 @@ static void flush_encoders(OutputStream *ost_table, int nb_ostreams) stop_encoding = 1; break; } - pkt.stream_index = ost->index; pkt.data = bit_buffer; pkt.size = ret; if (enc->coded_frame && enc->coded_frame->pts != AV_NOPTS_VALUE) @@ -1901,7 +1890,6 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p ost->sync_opts++; } - opkt.stream_index = ost->index; if (pkt->pts != AV_NOPTS_VALUE) opkt.pts = av_rescale_q(pkt->pts, ist->st->time_base, ost->st->time_base) - ost_tb_start_time; else |