| @@ -265,9 +265,11 @@ void ff_init_buffer_info(AVCodecContext *s, AVFrame *pic) · 264 unmodified lines |
| 265 | 265 | if (s->pkt) { |
| 266 | 266 | pic->pkt_pts = s->pkt->pts; |
| 267 | 267 | pic->pkt_pos = s->pkt->pos; |
| 268 | + pic->pkt_duration = s->pkt->duration; |
| 268 | 269 | } else { |
| 269 | 270 | pic->pkt_pts = AV_NOPTS_VALUE; |
| 270 | 271 | pic->pkt_pos = -1; |
| 272 | + pic->pkt_duration = 0; |
| 271 | 273 | } |
| 272 | 274 | pic->reordered_opaque= s->reordered_opaque; |
| 273 | 275 | pic->sample_aspect_ratio = s->sample_aspect_ratio; |
| @@ -384,9 +386,11 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame) · 110 unmodified lines |
| 384 | 386 | if (avctx->pkt) { |
| 385 | 387 | frame->pkt_pts = avctx->pkt->pts; |
| 386 | 388 | frame->pkt_pos = avctx->pkt->pos; |
| 389 | + frame->pkt_duration = avctx->pkt->duration; |
| 387 | 390 | } else { |
| 388 | 391 | frame->pkt_pts = AV_NOPTS_VALUE; |
| 389 | 392 | frame->pkt_pos = -1; |
| 393 | + frame->pkt_duration = 0; |
| 390 | 394 | } |
| 391 | 395 | |
| 392 | 396 | frame->reordered_opaque = avctx->reordered_opaque; |
| @@ -521,9 +525,11 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic) · 128 unmodified lines |
| 521 | 525 | if (s->pkt) { |
| 522 | 526 | pic->pkt_pts = s->pkt->pts; |
| 523 | 527 | pic->pkt_pos = s->pkt->pos; |
| 528 | + pic->pkt_duration = s->pkt->duration; |
| 524 | 529 | } else { |
| 525 | 530 | pic->pkt_pts = AV_NOPTS_VALUE; |
| 526 | 531 | pic->pkt_pos = -1; |
| 532 | + pic->pkt_duration = 0; |
| 527 | 533 | } |
| 528 | 534 | pic->reordered_opaque= s->reordered_opaque; |
| 529 | 535 | pic->sample_aspect_ratio = s->sample_aspect_ratio; |
| @@ -661,6 +667,7 @@ void avcodec_get_frame_defaults(AVFrame *pic){ · 131 unmodified lines |
| 661 | 667 | memset(pic, 0, sizeof(AVFrame)); |
| 662 | 668 | |
| 663 | 669 | pic->pts = pic->pkt_dts = pic->pkt_pts = pic->best_effort_timestamp = AV_NOPTS_VALUE; |
| 670 | + pic->pkt_duration = 0; |
| 664 | 671 | pic->pkt_pos = -1; |
| 665 | 672 | pic->key_frame= 1; |
| 666 | 673 | pic->sample_aspect_ratio = (AVRational){0, 1}; |
| @@ -682,6 +689,7 @@ AVFrame *avcodec_alloc_frame(void){ · 15 unmodified lines |
| 682 | 689 | void av_##name##_set_##field(str *s, type v) { s->field = v; } |
| 683 | 690 | |
| 684 | 691 | MAKE_ACCESSORS(AVFrame, frame, int64_t, best_effort_timestamp) |
| 692 | +MAKE_ACCESSORS(AVFrame, frame, int64_t, pkt_duration) |
| 685 | 693 | MAKE_ACCESSORS(AVFrame, frame, int64_t, pkt_pos) |
| 686 | 694 | MAKE_ACCESSORS(AVFrame, frame, int64_t, channel_layout) |
| 687 | 695 | MAKE_ACCESSORS(AVFrame, frame, int, sample_rate) |