Browse Source

Use AVFrame.pts instead of deprecated pkt_pts.

tags/n3.2
Anton Khirnov 9 years ago
parent
commit
beb62dac62
3 changed files with 3 additions and 5 deletions
  1. +1
    -1
      avconv.c
  2. +2
    -2
      avplay.c
  3. +0
    -2
      libavfilter/vsrc_movie.c

+ 1
- 1
avconv.c View File

@@ -1279,7 +1279,7 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
} }
ist->hwaccel_retrieved_pix_fmt = decoded_frame->format; ist->hwaccel_retrieved_pix_fmt = decoded_frame->format;


decoded_frame->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pkt_pts,
decoded_frame->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pts,
decoded_frame->pkt_dts); decoded_frame->pkt_dts);


if (ist->st->sample_aspect_ratio.num) if (ist->st->sample_aspect_ratio.num)


+ 2
- 2
avplay.c View File

@@ -1406,9 +1406,9 @@ static int get_video_frame(PlayerState *is, AVFrame *frame, int64_t *pts, AVPack


if (got_picture) { if (got_picture) {
if (decoder_reorder_pts == -1) { if (decoder_reorder_pts == -1) {
*pts = guess_correct_pts(&is->pts_ctx, frame->pkt_pts, frame->pkt_dts);
*pts = guess_correct_pts(&is->pts_ctx, frame->pts, frame->pkt_dts);
} else if (decoder_reorder_pts) { } else if (decoder_reorder_pts) {
*pts = frame->pkt_pts;
*pts = frame->pts;
} else { } else {
*pts = frame->pkt_dts; *pts = frame->pkt_dts;
} }


+ 0
- 2
libavfilter/vsrc_movie.c View File

@@ -228,8 +228,6 @@ static int movie_get_frame(AVFilterLink *outlink)
avcodec_decode_video2(movie->codec_ctx, movie->frame, &frame_decoded, &pkt); avcodec_decode_video2(movie->codec_ctx, movie->frame, &frame_decoded, &pkt);


if (frame_decoded) { if (frame_decoded) {
if (movie->frame->pkt_pts != AV_NOPTS_VALUE)
movie->frame->pts = movie->frame->pkt_pts;
av_log(outlink->src, AV_LOG_TRACE, av_log(outlink->src, AV_LOG_TRACE,
"movie_get_frame(): file:'%s' pts:%"PRId64" time:%f aspect:%d/%d\n", "movie_get_frame(): file:'%s' pts:%"PRId64" time:%f aspect:%d/%d\n",
movie->file_name, movie->frame->pts, movie->file_name, movie->frame->pts,


Loading…
Cancel
Save