diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-03-10 18:26:00 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-05-25 11:59:42 +0200 |
commit | 064b875e894f45ea9e0426696559645d87af0bc3 (patch) | |
tree | 05d5fbe353f5f60f46f6d4eefb242dacb5acbc17 /libavcodec/h264_slice.c | |
parent | 37140ebd87f549eae86a5b548d717a1e97203dd6 (diff) |
h264dec: support exporting QP tables through the AVVideoEncParams API
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r-- | libavcodec/h264_slice.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 5a8a4a7f86..713953778a 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -243,6 +243,15 @@ static int alloc_picture(H264Context *h, H264Picture *pic) pic->ref_index[i] = pic->ref_index_buf[i]->data; } + pic->pps_buf = av_buffer_ref(h->ps.pps_ref); + if (!pic->pps_buf) + goto fail; + pic->pps = (const PPS*)pic->pps_buf->data; + + pic->mb_width = h->mb_width; + pic->mb_height = h->mb_height; + pic->mb_stride = h->mb_stride; + return 0; fail: ff_h264_unref_picture(h, pic); |