[FFmpeg-cvslog] Merge commit '5d3953a5dcfd5f71391b7f34908517eb6f7e5146'
James Almer
git at videolan.org
Mon Oct 2 21:43:10 EEST 2017
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Oct 2 15:26:56 2017 -0300| [45121cbdda00627c9b51b3fd10ea044ebfaa6664] | committer: James Almer
Merge commit '5d3953a5dcfd5f71391b7f34908517eb6f7e5146'
* commit '5d3953a5dcfd5f71391b7f34908517eb6f7e5146':
matroskaenc: factor ts_offset into block timecode computation
Merged-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=45121cbdda00627c9b51b3fd10ea044ebfaa6664
---
libavformat/matroskaenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 17094f82b0..6f094c458c 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -2113,6 +2113,8 @@ static void mkv_write_block(AVFormatContext *s, AVIOContext *pb,
uint8_t track_number = (mkv->is_dash ? mkv->dash_track_number : (pkt->stream_index + 1));
ebml_master block_group, block_additions, block_more;
+ ts += mkv->tracks[pkt->stream_index].ts_offset;
+
av_log(s, AV_LOG_DEBUG, "Writing block at offset %" PRIu64 ", size %d, "
"pts %" PRId64 ", dts %" PRId64 ", duration %" PRId64 ", keyframe %d\n",
avio_tell(pb), pkt->size, pkt->pts, pkt->dts, pkt->duration,
======================================================================
diff --cc libavformat/matroskaenc.c
index 17094f82b0,2fe6e0ed49..6f094c458c
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@@ -2105,18 -1458,14 +2105,20 @@@ static void mkv_write_block(AVFormatCon
{
MatroskaMuxContext *mkv = s->priv_data;
AVCodecParameters *par = s->streams[pkt->stream_index]->codecpar;
- uint8_t *data = NULL;
- int offset = 0, size = pkt->size;
+ uint8_t *data = NULL, *side_data = NULL;
+ int offset = 0, size = pkt->size, side_data_size = 0;
int64_t ts = mkv->tracks[pkt->stream_index].write_dts ? pkt->dts : pkt->pts;
+ uint64_t additional_id = 0;
+ int64_t discard_padding = 0;
+ uint8_t track_number = (mkv->is_dash ? mkv->dash_track_number : (pkt->stream_index + 1));
+ ebml_master block_group, block_additions, block_more;
+
+ ts += mkv->tracks[pkt->stream_index].ts_offset;
+
av_log(s, AV_LOG_DEBUG, "Writing block at offset %" PRIu64 ", size %d, "
- "pts %" PRId64 ", dts %" PRId64 ", duration %" PRId64 ", flags %d\n",
- avio_tell(pb), pkt->size, pkt->pts, pkt->dts, pkt->duration, flags);
+ "pts %" PRId64 ", dts %" PRId64 ", duration %" PRId64 ", keyframe %d\n",
+ avio_tell(pb), pkt->size, pkt->pts, pkt->dts, pkt->duration,
+ keyframe != 0);
if (par->codec_id == AV_CODEC_ID_H264 && par->extradata_size > 0 &&
(AV_RB24(par->extradata) == 1 || AV_RB32(par->extradata) == 1))
ff_avc_parse_nal_units_buf(pkt->data, &data, &size);
More information about the ffmpeg-cvslog
mailing list