diff options
author | Luca Abeni <lucabe72@email.it> | 2008-07-23 10:56:56 +0000 |
---|---|---|
committer | Luca Abeni <lucabe72@email.it> | 2008-07-23 10:56:56 +0000 |
commit | fb34e75d2a3a3be41b4cea3ee11e1fd138692b40 (patch) | |
tree | 0fc3873d73ed60e9f483e9a32e0e12088174a117 | |
parent | 00a750009ffe232960ab0f729fdcbd454b233e26 (diff) | |
download | ffmpeg-fb34e75d2a3a3be41b4cea3ee11e1fd138692b40.tar.gz |
Do not rescale AV_NOPTS_VALUE in output_example.c
Originally committed as revision 14345 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | output_example.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/output_example.c b/output_example.c index 515a172661..0b0b67ffcf 100644 --- a/output_example.c +++ b/output_example.c @@ -156,6 +156,7 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st) pkt.size= avcodec_encode_audio(c, audio_outbuf, audio_outbuf_size, samples); + if (c->coded_frame->pts != AV_NOPTS_VALUE) pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base); pkt.flags |= PKT_FLAG_KEY; pkt.stream_index= st->index; @@ -380,6 +381,7 @@ static void write_video_frame(AVFormatContext *oc, AVStream *st) AVPacket pkt; av_init_packet(&pkt); + if (c->coded_frame->pts != AV_NOPTS_VALUE) pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base); if(c->coded_frame->key_frame) pkt.flags |= PKT_FLAG_KEY; |