1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

tests/api: use AVFrame.duration instead of AVFrame.pkt_duration

This commit is contained in:
Anton Khirnov 2022-07-11 10:31:47 +02:00
parent de3a135e0f
commit 9c0401bd59
2 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ static int video_decode_example(const char *input_filename)
return number_of_written_bytes;
}
printf("%d, %s, %s, %8"PRId64", %8d, 0x%08"PRIx32"\n", video_stream,
av_ts2str(fr->pts), av_ts2str(fr->pkt_dts), fr->pkt_duration,
av_ts2str(fr->pts), av_ts2str(fr->pkt_dts), fr->duration,
number_of_written_bytes, av_adler32_update(0, (const uint8_t*)byte_buffer, number_of_written_bytes));
av_frame_unref(fr);

View File

@ -156,7 +156,7 @@ static int compute_crc_of_packets(AVFormatContext *fmt_ctx, int video_stream,
}
av_frame_unref(fr);
}
} while (result >= 0 && (no_seeking || (fr->pts + fr->pkt_duration <= ts_end)));
} while (result >= 0 && (no_seeking || (fr->pts + fr->duration <= ts_end)));
finish:
av_freep(&byte_buffer);