diff --git a/src/zm_ffmpeg.cpp b/src/zm_ffmpeg.cpp index 6ff053c34..352e45b85 100644 --- a/src/zm_ffmpeg.cpp +++ b/src/zm_ffmpeg.cpp @@ -257,9 +257,10 @@ void zm_dump_codecpar(const AVCodecParameters *par) { #endif void zm_dump_codec(const AVCodecContext *codec) { - Debug(1, "Dumping codec_context codec_type(%d) codec_id(%d %s) width(%d) height(%d) timebase(%d/%d) format(%s) " + Debug(1, "Dumping codec_context codec_type(%d %s) codec_id(%d %s) width(%d) height(%d) timebase(%d/%d) format(%s) " "gop_size %d max_b_frames %d me_cmp %d me_range %d qmin %d qmax %d", codec->codec_type, + av_get_media_type_string(codec->codec_type), codec->codec_id, avcodec_get_name(codec->codec_id), codec->width, @@ -306,7 +307,10 @@ void zm_dump_stream_format(AVFormatContext *ic, int i, int index, int is_output) ); #if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0) - Debug(1, "codec: %s", avcodec_get_name(st->codecpar->codec_id)); + Debug(1, "codec: %s %s", + avcodec_get_name(st->codecpar->codec_id), + av_get_media_type_string(st->codecpar->codec_type) + ); #else char buf[256]; avcodec_string(buf, sizeof(buf), st->codec, is_output); diff --git a/src/zm_ffmpeg.h b/src/zm_ffmpeg.h index ec22bfc33..0f28a1176 100644 --- a/src/zm_ffmpeg.h +++ b/src/zm_ffmpeg.h @@ -370,7 +370,7 @@ void zm_dump_codecpar(const AVCodecParameters *par); double pts_time = static_cast(av_rescale_q(pkt.pts, stream->time_base, AV_TIME_BASE_Q)) / AV_TIME_BASE; \ \ Debug(2, "%s: pts: %" PRId64 " * %u/%u=%f, dts: %" PRId64 \ - ", size: %d, stream_index: %d, flags: %04x, keyframe(%d) pos: %" PRId64", duration: %" AV_PACKET_DURATION_FMT, \ + ", size: %d, stream_index: %d, %s flags: %04x, keyframe(%d) pos: %" PRId64", duration: %" AV_PACKET_DURATION_FMT, \ text, \ pkt.pts, \ stream->time_base.num, \ @@ -379,6 +379,7 @@ void zm_dump_codecpar(const AVCodecParameters *par); pkt.dts, \ pkt.size, \ pkt.stream_index, \ + av_get_media_type_string(stream->codecpar->codec_type), \ pkt.flags, \ pkt.flags & AV_PKT_FLAG_KEY, \ pkt.pos, \