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