Revision 1ba57272
cmdutils.c | ||
---|---|---|
907 | 907 |
|
908 | 908 |
memcpy(frame->data, picref->data, sizeof(frame->data)); |
909 | 909 |
memcpy(frame->linesize, picref->linesize, sizeof(frame->linesize)); |
910 |
frame->pkt_pos = picref->pos; |
|
910 | 911 |
frame->interlaced_frame = picref->video->interlaced; |
911 | 912 |
frame->top_field_first = picref->video->top_field_first; |
912 | 913 |
frame->key_frame = picref->video->key_frame; |
doc/APIchanges | ||
---|---|---|
13 | 13 |
|
14 | 14 |
API changes, most recent first: |
15 | 15 |
|
16 |
2011-05-01 - xxxxxxx - lavc 53.2.0 - AVFrame |
|
17 |
Add a pkt_pos field to AVFrame. |
|
18 |
|
|
16 | 19 |
2011-04-xx - xxxxxxx - lavu 51.2.0 - mem.h |
17 | 20 |
Add av_dynarray_add function for adding |
18 | 21 |
an element to a dynamic array. |
ffplay.c | ||
---|---|---|
1687 | 1687 |
av_free_packet(&pkt); |
1688 | 1688 |
|
1689 | 1689 |
picref->pts = pts; |
1690 |
picref->pos = pkt.pos;
|
|
1690 |
picref->pos = priv->frame->pkt_pos;
|
|
1691 | 1691 |
picref->video->pixel_aspect = priv->is->video_st->codec->sample_aspect_ratio; |
1692 | 1692 |
avfilter_start_frame(link, picref); |
1693 | 1693 |
avfilter_draw_slice(link, 0, link->h, 1); |
libavcodec/avcodec.h | ||
---|---|---|
1004 | 1004 |
* - decoding: set by libavcodec, read by user.\ |
1005 | 1005 |
*/\ |
1006 | 1006 |
int64_t best_effort_timestamp;\ |
1007 |
\ |
|
1008 |
/**\ |
|
1009 |
* reordered pos from the last AVPacket that has been input into the decoder\ |
|
1010 |
* - encoding: unused\ |
|
1011 |
* - decoding: Read by user.\ |
|
1012 |
*/\ |
|
1013 |
int64_t pkt_pos;\ |
|
1007 | 1014 |
|
1008 | 1015 |
|
1009 | 1016 |
#define FF_QSCALE_TYPE_MPEG1 0 |
libavcodec/rawdec.c | ||
---|---|---|
124 | 124 |
frame->top_field_first = avctx->coded_frame->top_field_first; |
125 | 125 |
frame->reordered_opaque = avctx->reordered_opaque; |
126 | 126 |
frame->pkt_pts = avctx->pkt->pts; |
127 |
frame->pkt_pos = avctx->pkt->pos; |
|
127 | 128 |
|
128 | 129 |
//2bpp and 4bpp raw in avi and mov (yes this is ugly ...) |
129 | 130 |
if (context->buffer) { |
libavcodec/utils.c | ||
---|---|---|
341 | 341 |
} |
342 | 342 |
s->internal_buffer_count++; |
343 | 343 |
|
344 |
if(s->pkt) pic->pkt_pts= s->pkt->pts; |
|
345 |
else pic->pkt_pts= AV_NOPTS_VALUE; |
|
344 |
if (s->pkt) { |
|
345 |
pic->pkt_pts = s->pkt->pts; |
|
346 |
pic->pkt_pos = s->pkt->pos; |
|
347 |
} else { |
|
348 |
pic->pkt_pts = AV_NOPTS_VALUE; |
|
349 |
pic->pkt_pos = -1; |
|
350 |
} |
|
346 | 351 |
pic->reordered_opaque= s->reordered_opaque; |
347 | 352 |
|
348 | 353 |
if(s->debug&FF_DEBUG_BUFFERS) |
... | ... | |
448 | 453 |
memset(pic, 0, sizeof(AVFrame)); |
449 | 454 |
|
450 | 455 |
pic->pts = pic->best_effort_timestamp = AV_NOPTS_VALUE; |
456 |
pic->pkt_pos = -1; |
|
451 | 457 |
pic->key_frame= 1; |
452 | 458 |
} |
453 | 459 |
|
... | ... | |
730 | 736 |
ret = avctx->codec->decode(avctx, picture, got_picture_ptr, |
731 | 737 |
avpkt); |
732 | 738 |
picture->pkt_dts= avpkt->dts; |
739 |
picture->pkt_pos= avpkt->pos; |
|
733 | 740 |
} |
734 | 741 |
|
735 | 742 |
emms_c(); //needed to avoid an emms_c() call before every return; |
libavcodec/version.h | ||
---|---|---|
21 | 21 |
#define AVCODEC_VERSION_H |
22 | 22 |
|
23 | 23 |
#define LIBAVCODEC_VERSION_MAJOR 53 |
24 |
#define LIBAVCODEC_VERSION_MINOR 1
|
|
25 |
#define LIBAVCODEC_VERSION_MICRO 2
|
|
24 |
#define LIBAVCODEC_VERSION_MINOR 2
|
|
25 |
#define LIBAVCODEC_VERSION_MICRO 0
|
|
26 | 26 |
|
27 | 27 |
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
28 | 28 |
LIBAVCODEC_VERSION_MINOR, \ |
libavfilter/vsrc_movie.c | ||
---|---|---|
230 | 230 |
while ((ret = av_read_frame(movie->format_ctx, &pkt)) >= 0) { |
231 | 231 |
// Is this a packet from the video stream? |
232 | 232 |
if (pkt.stream_index == movie->stream_index) { |
233 |
movie->codec_ctx->reordered_opaque = pkt.pos; |
|
234 | 233 |
avcodec_decode_video2(movie->codec_ctx, movie->frame, &frame_decoded, &pkt); |
235 | 234 |
|
236 | 235 |
if (frame_decoded) { |
... | ... | |
247 | 246 |
movie->picref->pts = movie->frame->pkt_pts == AV_NOPTS_VALUE ? |
248 | 247 |
movie->frame->pkt_dts : movie->frame->pkt_pts; |
249 | 248 |
|
250 |
movie->picref->pos = movie->frame->reordered_opaque;
|
|
249 |
movie->picref->pos = movie->frame->pkt_pos;
|
|
251 | 250 |
movie->picref->video->pixel_aspect = st->sample_aspect_ratio.num ? |
252 | 251 |
st->sample_aspect_ratio : movie->codec_ctx->sample_aspect_ratio; |
253 | 252 |
movie->picref->video->interlaced = movie->frame->interlaced_frame; |
Also available in: Unified diff