X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavformat%2Fmpegtsenc.c;h=a32c6d6787466dc387b9f9b06653b1fabd82b6dc;hp=0184d871490a59652e46a481608125a1abfa4cec;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavformat/mpegtsenc.c b/ffmpeg/libavformat/mpegtsenc.c index 0184d87..a32c6d6 100644 --- a/ffmpeg/libavformat/mpegtsenc.c +++ b/ffmpeg/libavformat/mpegtsenc.c @@ -577,7 +577,7 @@ static void mpegts_prefix_m2ts_header(AVFormatContext *s) 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)); } } @@ -721,6 +721,7 @@ static int mpegts_write_header(AVFormatContext *s) 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; @@ -1197,7 +1198,9 @@ int ff_check_h264_startcode(AVFormatContext *s, const AVStream *st, const AVPack "('-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; } @@ -1209,7 +1212,9 @@ static int check_hevc_startcode(AVFormatContext *s, const AVStream *st, const AV 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; } @@ -1433,7 +1438,7 @@ static const AVOption options[] = { { .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 },