diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-05-29 02:06:32 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-05-29 02:06:32 +0000 |
commit | e928649b0bf6c8c7b87eb09d5e393a70387b10e9 (patch) | |
tree | 3f065adcb0e5c14127d01162d7cc8a0d934c073f /libavformat/ogg.c | |
parent | a7b2871cd1401ce7be59b153eed3f25565b0bb23 (diff) | |
download | ffmpeg-e928649b0bf6c8c7b87eb09d5e393a70387b10e9.tar.gz |
pass AVPacket into av_write_frame()
fixes the random dts/pts during encoding
asf preroll fix
no more initial zero frames for b frame encoding
mpeg-es dts during demuxing fixed
.ffm timestamp scale fixed, ffm is still broken though
Originally committed as revision 3168 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ogg.c')
-rw-r--r-- | libavformat/ogg.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libavformat/ogg.c b/libavformat/ogg.c index 82354c6cdd..3d90868a02 100644 --- a/libavformat/ogg.c +++ b/libavformat/ogg.c @@ -62,16 +62,15 @@ static int ogg_write_header(AVFormatContext *avfcontext) return 0 ; } -static int ogg_write_packet(AVFormatContext *avfcontext, - int stream_index, - const uint8_t *buf, int size, int64_t pts) +static int ogg_write_packet(AVFormatContext *avfcontext, AVPacket *pkt) { OggContext *context = avfcontext->priv_data ; - AVCodecContext *avctx= &avfcontext->streams[stream_index]->codec; + AVCodecContext *avctx= &avfcontext->streams[pkt->stream_index]->codec; ogg_packet *op= &context->op; ogg_page og ; + int64_t pts; - pts= av_rescale(pts, avctx->sample_rate, AV_TIME_BASE); + pts= av_rescale(pkt->pts, avctx->sample_rate, AV_TIME_BASE); // av_log(avfcontext, AV_LOG_DEBUG, "M%d\n", size); @@ -86,8 +85,8 @@ static int ogg_write_packet(AVFormatContext *avfcontext, context->header_handled = 1 ; } - op->packet = (uint8_t*) buf; - op->bytes = size; + op->packet = (uint8_t*) pkt->data; + op->bytes = pkt->size; op->b_o_s = op->packetno == 0; op->granulepos= pts; |