diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2015-11-17 15:58:51 +0000 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2015-11-18 16:37:58 +0000 |
commit | e73a4d8491615e751b1229ce1cdc2eee4dfff191 (patch) | |
tree | 1db27a99c565c5f05b411f2ecec482a5dea813a2 /libavformat/movenc-test.c | |
parent | 3a4d8281c64b6cb2a787e6e7142bd51deb356644 (diff) | |
download | ffmpeg-e73a4d8491615e751b1229ce1cdc2eee4dfff191.tar.gz |
movenc-test: Pad the packet data start with 0s
This way, it never starts with 0xFFF0, and never trips the
ADTS "Detection" code in movenc.c.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/movenc-test.c')
-rw-r--r-- | libavformat/movenc-test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/movenc-test.c b/libavformat/movenc-test.c index 8132babbbe..d9c7a1a005 100644 --- a/libavformat/movenc-test.c +++ b/libavformat/movenc-test.c @@ -215,7 +215,7 @@ static void mux_frames(int n) int end_frames = frames + n; while (1) { AVPacket pkt; - uint8_t pktdata[4]; + uint8_t pktdata[8] = { 0 }; av_init_packet(&pkt); if (av_compare_ts(audio_dts, audio_st->time_base, video_dts, video_st->time_base) < 0) { @@ -257,9 +257,9 @@ static void mux_frames(int n) if (clear_duration) pkt.duration = 0; - AV_WB32(pktdata, pkt.pts); + AV_WB32(pktdata + 4, pkt.pts); pkt.data = pktdata; - pkt.size = 4; + pkt.size = 8; if (skip_write) continue; if (skip_write_audio && pkt.stream_index == 1) |