diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-05-29 18:50:31 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-05-29 18:50:31 +0000 |
commit | 3c895fc098f7637f6d5ec3a9d6766e724a8b9e41 (patch) | |
tree | 712ed6644fa0f4e5d9b6201048c320d5208eabe8 /libavformat/asf-enc.c | |
parent | 575181556259ca3a69a17a544a0ab3b45c4fec61 (diff) | |
download | ffmpeg-3c895fc098f7637f6d5ec3a9d6766e724a8b9e41.tar.gz |
correctly interleave packets during encoding
dts/pts fixed for streamcopy
dont use coded_frame->key_frame hack in muxers, use AVPacket.flags instead
Originally committed as revision 3171 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf-enc.c')
-rw-r--r-- | libavformat/asf-enc.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libavformat/asf-enc.c b/libavformat/asf-enc.c index 9e87909858..747bdee812 100644 --- a/libavformat/asf-enc.c +++ b/libavformat/asf-enc.c @@ -586,7 +586,8 @@ static void put_payload_header( int presentation_time, int m_obj_size, int m_obj_offset, - int payload_len + int payload_len, + int flags ) { ASFContext *asf = s->priv_data; @@ -594,7 +595,7 @@ static void put_payload_header( int val; val = stream->num; - if (s->streams[val - 1]->codec.coded_frame->key_frame) + if (flags & PKT_FLAG_KEY) val |= ASF_PL_FLAG_KEY_FRAME; put_byte(pb, val); @@ -621,7 +622,8 @@ static void put_frame( ASFStream *stream, int timestamp, const uint8_t *buf, - int m_obj_size + int m_obj_size, + int flags ) { ASFContext *asf = s->priv_data; @@ -662,7 +664,7 @@ static void put_frame( else if (payload_len == (frag_len1 - 1)) payload_len = frag_len1 - 2; //additional byte need to put padding length - put_payload_header(s, stream, timestamp+preroll_time, m_obj_size, m_obj_offset, payload_len); + put_payload_header(s, stream, timestamp+preroll_time, m_obj_size, m_obj_offset, payload_len, flags); put_buffer(&asf->pb, buf, payload_len); if (asf->multi_payloads_present) @@ -706,7 +708,7 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt) if (duration > asf->duration) asf->duration = duration; - put_frame(s, stream, pkt->pts, pkt->data, pkt->size); + put_frame(s, stream, pkt->pts, pkt->data, pkt->size, pkt->flags); return 0; } |