summaryrefslogtreecommitdiffstats
path: root/libavcodec/diracdec.c
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2016-01-21 16:46:41 +0000
committerRostislav Pehlivanov <atomnuker@gmail.com>2016-01-21 16:49:45 +0000
commit5776344a7bc953cd93d1dd7762bd6f193378ed26 (patch)
tree74962051b931835eae135841817a7e7ae0054516 /libavcodec/diracdec.c
parent053900ca4c72fd4bcaec7e6c7e842fcade3c9f3f (diff)
downloadffmpeg-streaming-5776344a7bc953cd93d1dd7762bd6f193378ed26.zip
ffmpeg-streaming-5776344a7bc953cd93d1dd7762bd6f193378ed26.tar.gz
diracdec: fix original Dirac Low Delay profile
The version structure in the main decoder context was not (and apparently has never been) populated since it was added. Still, having VC-2 break the existing Dirac Low Delay mode was odd and easily avoidable had the specifications authors noticed/cared. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Diffstat (limited to 'libavcodec/diracdec.c')
-rw-r--r--libavcodec/diracdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index 8ab4360..ca44e7b 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -2085,6 +2085,8 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int
avctx->level = dsh->level;
avctx->framerate = dsh->framerate;
s->bit_depth = dsh->bit_depth;
+ s->version.major = dsh->version.major;
+ s->version.minor = dsh->version.minor;
s->seq = *dsh;
av_freep(&dsh);
@@ -2143,6 +2145,7 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int
pic->avframe->key_frame = s->num_refs == 0; /* [DIRAC_STD] is_intra() */
pic->avframe->pict_type = s->num_refs + 1; /* Definition of AVPictureType in avutil.h */
+ /* VC-2 Low Delay has a different parse code than the Dirac Low Delay */
if (s->version.minor == 2 && parse_code == 0x88)
s->ld_picture = 1;
OpenPOWER on IntegriCloud