uint32_t tp_extra_header = pcr % 0x3fffffff;
tp_extra_header = AV_RB32(&tp_extra_header);
avio_write(s->pb, (unsigned char *) &tp_extra_header,
- sizeof(tp_extra_header));
+ sizeof(tp_extra_header));
}
}
ret = avcodec_copy_context(ast->codec, st->codec);
if (ret != 0)
goto fail;
+ ast->time_base = st->time_base;
ret = avformat_write_header(ts_st->amux, NULL);
if (ret < 0)
goto fail;
"('-bsf:v h264_mp4toannexb' option with ffmpeg)\n");
return AVERROR_INVALIDDATA;
}
- av_log(s, AV_LOG_WARNING, "H.264 bitstream error, startcode missing\n");
+ av_log(s, AV_LOG_WARNING, "H.264 bitstream error, startcode missing, size %d", pkt->size);
+ if (pkt->size) av_log(s, AV_LOG_WARNING, " data %08X", AV_RB32(pkt->data));
+ av_log(s, AV_LOG_WARNING, "\n");
}
return 0;
}
av_log(s, AV_LOG_ERROR, "HEVC bitstream malformed, no startcode found\n");
return AVERROR_PATCHWELCOME;
}
- av_log(s, AV_LOG_WARNING, "HEVC bitstream error, startcode missing\n");
+ av_log(s, AV_LOG_WARNING, "HEVC bitstream error, startcode missing, size %d", pkt->size);
+ if (pkt->size) av_log(s, AV_LOG_WARNING, " data %08X", AV_RB32(pkt->data));
+ av_log(s, AV_LOG_WARNING, "\n");
}
return 0;
}
{ .i64 = 0x1000 }, 0x0010, 0x1f00, AV_OPT_FLAG_ENCODING_PARAM },
{ "mpegts_start_pid", "Set the first pid.",
offsetof(MpegTSWrite, start_pid), AV_OPT_TYPE_INT,
- { .i64 = 0x0100 }, 0x0100, 0x0f00, AV_OPT_FLAG_ENCODING_PARAM },
+ { .i64 = 0x0100 }, 0x0020, 0x0f00, AV_OPT_FLAG_ENCODING_PARAM },
{ "mpegts_m2ts_mode", "Enable m2ts mode.",
offsetof(MpegTSWrite, m2ts_mode), AV_OPT_TYPE_INT,
{ .i64 = -1 }, -1, 1, AV_OPT_FLAG_ENCODING_PARAM },