make dump_video_frame a define instead of a function, fix linesize

pull/2676/head
Isaac Connor 2019-08-10 14:45:45 -04:00
parent 38a09bbd18
commit 0cdb43e165
2 changed files with 9 additions and 13 deletions

View File

@ -287,18 +287,6 @@ static void zm_log_fps(double d, const char *postfix) {
}
}
void zm_dump_video_frame(const AVFrame *frame, const char *text) {
Debug(1, "%s: format %d %s %dx%d linesize:%d pts: %" PRId64,
text,
frame->format,
av_get_pix_fmt_name((AVPixelFormat)frame->format),
frame->width,
frame->height,
frame->linesize,
frame->pts
);
}
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
void zm_dump_codecpar ( const AVCodecParameters *par ) {
Debug(1, "Dumping codecpar codec_type(%d) codec_id(%d) codec_tag(%d) width(%d) height(%d) bit_rate(%d) format(%d = %s)",

View File

@ -329,7 +329,15 @@ void zm_dump_codecpar(const AVCodecParameters *par);
#endif
void zm_dump_video_frame(const AVFrame *frame, const char *text="Frame");
#define zm_dump_video_frame(frame,text) Debug(1, "%s: format %d %s %dx%d linesize:%dx%d pts: %" PRId64, \
text, \
frame->format, \
av_get_pix_fmt_name((AVPixelFormat)frame->format), \
frame->width, \
frame->height, \
frame->linesize[0], frame->linesize[1], \
frame->pts \
);
#if LIBAVCODEC_VERSION_CHECK(56, 8, 0, 60, 100)
#define zm_av_packet_unref( packet ) av_packet_unref( packet )