diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-26 02:48:12 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-26 04:20:52 +0100 |
commit | 6795dcfa659c5f1f00c8db4eb3cb565939023e78 (patch) | |
tree | fdd3ec0dd9a484d47deb384f3ee08e42f2bc43b7 /libavcodec | |
parent | 4090d5baa89467e4ebdc7747e795bd6d83a91635 (diff) | |
download | ffmpeg-streaming-6795dcfa659c5f1f00c8db4eb3cb565939023e78.zip ffmpeg-streaming-6795dcfa659c5f1f00c8db4eb3cb565939023e78.tar.gz |
avcodec/hevc: Export picture type
This only uses the first slice, improvement here is welcome
analyzing all slices the trivial way would interfere with threads
Fixes Ticket3185
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/hevc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 4aa1e55..63097ed 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2227,6 +2227,7 @@ static int hevc_frame_start(HEVCContext *s) int pic_size_in_ctb = ((s->sps->width >> s->sps->log2_min_cb_size) + 1) * ((s->sps->height >> s->sps->log2_min_cb_size) + 1); int ret; + AVFrame *cur_frame; memset(s->horizontal_bs, 0, 2 * s->bs_width * (s->bs_height + 1)); memset(s->vertical_bs, 0, 2 * s->bs_width * (s->bs_height + 1)); @@ -2255,6 +2256,9 @@ static int hevc_frame_start(HEVCContext *s) if (ret < 0) goto fail; + cur_frame = s->sps->sao_enabled ? s->sao_frame : s->frame; + cur_frame->pict_type = 3 - s->sh.slice_type; + av_frame_unref(s->output_frame); ret = ff_hevc_output_frame(s, s->output_frame, 0); if (ret < 0) |