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>
This commit is contained in:
Derek Buitenhuis 2015-11-17 15:58:51 +00:00
parent 3a4d8281c6
commit e73a4d8491
2 changed files with 23 additions and 23 deletions

View file

@ -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)