diff options
author | Peter Ross <pross@xvid.org> | 2012-11-07 16:52:12 +1100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-07 13:45:01 +0100 |
commit | 3e65134326b8b904ae95e1fd848c85bbcc12dac6 (patch) | |
tree | 3707b3919f97a053c22b37d8f36f7271c3a5ef00 /libavformat/wtvenc.c | |
parent | 0d9435048c12d8a322c60ff1c9983ec52730c178 (diff) | |
download | ffmpeg-3e65134326b8b904ae95e1fd848c85bbcc12dac6.tar.gz |
wtvenc: output third video pts in timestamp chunk (this is what Microsoft Windows Media Center expects)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/wtvenc.c')
-rw-r--r-- | libavformat/wtvenc.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libavformat/wtvenc.c b/libavformat/wtvenc.c index e86bfeb779..e07821319f 100644 --- a/libavformat/wtvenc.c +++ b/libavformat/wtvenc.c @@ -84,7 +84,6 @@ typedef struct { WtvFile file[WTV_FILES]; int64_t serial; /** chunk serial number */ int64_t last_chunk_pos; /** last chunk position */ - int64_t frame_nb; WtvChunkEntry index[MAX_NB_INDEX]; int nb_index; @@ -374,19 +373,15 @@ static void write_timestamp(AVFormatContext *s, AVPacket *pkt) WtvContext *wctx = s->priv_data; AVCodecContext *enc = s->streams[pkt->stream_index]->codec; int flag = 0; - int64_t frame_number = 0; if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { - wctx->frame_nb++; - frame_number = wctx->frame_nb; flag = pkt->flags & AV_PKT_FLAG_KEY ? 1 : 0; } write_chunk_header(s, &ff_timestamp_guid, 56, 0x40000000 | (INDEX_BASE + pkt->stream_index)); write_pad(pb, 8); avio_wl64(pb, pkt->pts == AV_NOPTS_VALUE ? -1 : pkt->pts); avio_wl64(pb, pkt->pts == AV_NOPTS_VALUE ? -1 : pkt->pts); - - avio_wl64(pb, frame_number); + avio_wl64(pb, pkt->pts == AV_NOPTS_VALUE ? -1 : pkt->pts); avio_wl64(pb, 0); avio_wl64(pb, flag); avio_wl64(pb, 0); |