summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-12-14 11:58:21 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-12-15 11:46:30 +0100
commit96d815fc0c71d08b9c4bd65aea021bd0760f2287 (patch)
tree5604c1d6956389eb5ca732febb983960cfd50792 /libavcodec/utils.c
parenta8b3f0c5cf548f654e30c981988bb71981a3f8d3 (diff)
lavc: add pkt_size field to AVFrame
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index dcf81e6351..abd930d746 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -512,10 +512,12 @@ void ff_init_buffer_info(AVCodecContext *s, AVFrame *frame)
frame->pkt_pts = s->pkt->pts;
frame->pkt_pos = s->pkt->pos;
frame->pkt_duration = s->pkt->duration;
+ frame->pkt_size = s->pkt->size;
} else {
frame->pkt_pts = AV_NOPTS_VALUE;
frame->pkt_pos = -1;
frame->pkt_duration = 0;
+ frame->pkt_size = -1;
}
frame->reordered_opaque = s->reordered_opaque;
@@ -677,6 +679,7 @@ void avcodec_get_frame_defaults(AVFrame *frame)
frame->best_effort_timestamp = AV_NOPTS_VALUE;
frame->pkt_duration = 0;
frame->pkt_pos = -1;
+ frame->pkt_size = -1;
frame->key_frame = 1;
frame->sample_aspect_ratio = (AVRational) {0, 1 };
frame->format = -1; /* unknown */
@@ -723,6 +726,7 @@ MAKE_ACCESSORS(AVFrame, frame, int, channels)
MAKE_ACCESSORS(AVFrame, frame, int, sample_rate)
MAKE_ACCESSORS(AVFrame, frame, AVDictionary *, metadata)
MAKE_ACCESSORS(AVFrame, frame, int, decode_error_flags)
+MAKE_ACCESSORS(AVFrame, frame, int, pkt_size)
MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor)