diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-02-12 19:24:53 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-02-12 19:24:53 +0000 |
commit | 0d9f863340138e83a5c99f47d3ca46a2dc3b3351 (patch) | |
tree | 50f38e42e0af3bee22a6f58e0589dfca32cc6cb2 /libavformat/asf-enc.c | |
parent | 5600b6e19e05aed9f5734450a3a3da2deed6ee4e (diff) | |
download | ffmpeg-0d9f863340138e83a5c99f47d3ca46a2dc3b3351.tar.gz |
dont set the keyframe flag for audio as microshitty doesnt do it and some things have problems with our asfs, maybe that has a positive effect?
Originally committed as revision 7952 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf-enc.c')
-rw-r--r-- | libavformat/asf-enc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/asf-enc.c b/libavformat/asf-enc.c index 50c282d61a..1d9b5ab83d 100644 --- a/libavformat/asf-enc.c +++ b/libavformat/asf-enc.c @@ -715,10 +715,14 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt) AVCodecContext *codec; int64_t packet_st,pts; int start_sec,i; + int flags= pkt->flags; codec = s->streams[pkt->stream_index]->codec; stream = &asf->streams[pkt->stream_index]; + if(codec->codec_type == CODEC_TYPE_AUDIO) + flags &= ~PKT_FLAG_KEY; + //XXX /FIXME use duration from AVPacket (quick hack by) pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts; assert(pts != AV_NOPTS_VALUE); @@ -726,10 +730,10 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt) asf->duration= FFMAX(asf->duration, duration); packet_st = asf->nb_packets; - put_frame(s, stream, pkt->dts, pkt->data, pkt->size, pkt->flags); + put_frame(s, stream, pkt->dts, pkt->data, pkt->size, flags); /* check index */ - if ((!asf->is_streamed) && (codec->codec_type == CODEC_TYPE_VIDEO) && (pkt->flags & PKT_FLAG_KEY)) { + if ((!asf->is_streamed) && (flags & PKT_FLAG_KEY)) { start_sec = (int)(duration / INT64_C(10000000)); if (start_sec != (int)(asf->last_indexed_pts / INT64_C(10000000))) { for(i=asf->nb_index_count;i<start_sec;i++) { |