Browse Source

hevc: Support extradata changes

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
tags/n3.3
Vittorio Giovara 9 years ago
parent
commit
25fcbf7a84
3 changed files with 11 additions and 5 deletions
  1. +10
    -0
      libavcodec/hevc.c
  2. +1
    -1
      libavcodec/version.h
  3. +0
    -4
      libavformat/mov.c

+ 10
- 0
libavcodec/hevc.c View File

@@ -3049,6 +3049,8 @@ static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output,
AVPacket *avpkt) AVPacket *avpkt)
{ {
int ret; int ret;
int new_extradata_size;
uint8_t *new_extradata;
HEVCContext *s = avctx->priv_data; HEVCContext *s = avctx->priv_data;


if (!avpkt->size) { if (!avpkt->size) {
@@ -3060,6 +3062,14 @@ static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output,
return 0; return 0;
} }


new_extradata = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA,
&new_extradata_size);
if (new_extradata && new_extradata_size > 0) {
ret = hevc_decode_extradata(s, new_extradata, new_extradata_size);
if (ret < 0)
return ret;
}

s->ref = NULL; s->ref = NULL;
ret = decode_nal_units(s, avpkt->data, avpkt->size); ret = decode_nal_units(s, avpkt->data, avpkt->size);
if (ret < 0) if (ret < 0)


+ 1
- 1
libavcodec/version.h View File

@@ -29,7 +29,7 @@


#define LIBAVCODEC_VERSION_MAJOR 57 #define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 66 #define LIBAVCODEC_VERSION_MINOR 66
#define LIBAVCODEC_VERSION_MICRO 108
#define LIBAVCODEC_VERSION_MICRO 109


#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \ LIBAVCODEC_VERSION_MINOR, \


+ 0
- 4
libavformat/mov.c View File

@@ -2232,10 +2232,6 @@ static int mov_skip_multiple_stsd(MOVContext *c, AVIOContext *pb,
avio_skip(pb, size); avio_skip(pb, size);
return 1; return 1;
} }
if ( codec_tag == AV_RL32("hvc1") ||
codec_tag == AV_RL32("hev1")
)
av_log(c->fc, AV_LOG_WARNING, "Concatenated H.264 or H.265 might not play correctly.\n");


return 0; return 0;
} }


Loading…
Cancel
Save