"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libavcodec/h264dec.c" between
libav-12.tar.gz and libav-12.1.tar.gz

About: libav provides cross-platform tools ("avconv") and libraries to convert, manipulate and stream a wide range of multimedia (audio and video) formats and protocols.

h264dec.c  (libav-12):h264dec.c  (libav-12.1)
skipping to change at line 452 skipping to change at line 452
{ {
int i; int i;
for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++) for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++)
h->last_pocs[i] = INT_MIN; h->last_pocs[i] = INT_MIN;
h->next_outputed_poc = INT_MIN; h->next_outputed_poc = INT_MIN;
h->prev_interlaced_frame = 1; h->prev_interlaced_frame = 1;
idr(h); idr(h);
if (h->cur_pic_ptr) if (h->cur_pic_ptr)
h->cur_pic_ptr->reference = 0; h->cur_pic_ptr->reference = 0;
h->first_field = 0; h->first_field = 0;
ff_h264_sei_uninit(&h->sei);
h->recovery_frame = -1; h->recovery_frame = -1;
h->frame_recovered = 0; h->frame_recovered = 0;
} }
/* forget old pics after a seek */ /* forget old pics after a seek */
static void flush_dpb(AVCodecContext *avctx) static void flush_dpb(AVCodecContext *avctx)
{ {
H264Context *h = avctx->priv_data; H264Context *h = avctx->priv_data;
int i; int i;
memset(h->delayed_pic, 0, sizeof(h->delayed_pic)); memset(h->delayed_pic, 0, sizeof(h->delayed_pic));
ff_h264_flush_change(h); ff_h264_flush_change(h);
ff_h264_sei_uninit(&h->sei);
for (i = 0; i < H264_MAX_PICTURE_COUNT; i++) for (i = 0; i < H264_MAX_PICTURE_COUNT; i++)
ff_h264_unref_picture(h, &h->DPB[i]); ff_h264_unref_picture(h, &h->DPB[i]);
h->cur_pic_ptr = NULL; h->cur_pic_ptr = NULL;
ff_h264_unref_picture(h, &h->cur_pic); ff_h264_unref_picture(h, &h->cur_pic);
h->mb_y = 0; h->mb_y = 0;
ff_h264_free_tables(h); ff_h264_free_tables(h);
h->context_initialized = 0; h->context_initialized = 0;
skipping to change at line 523 skipping to change at line 523
} }
static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size) static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
{ {
AVCodecContext *const avctx = h->avctx; AVCodecContext *const avctx = h->avctx;
int nals_needed = 0; ///< number of NALs that need decoding before the next frame thread starts int nals_needed = 0; ///< number of NALs that need decoding before the next frame thread starts
int i, ret = 0; int i, ret = 0;
if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS)) { if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS)) {
h->current_slice = 0; h->current_slice = 0;
h->field_started = 0;
if (!h->first_field) if (!h->first_field)
h->cur_pic_ptr = NULL; h->cur_pic_ptr = NULL;
ff_h264_sei_uninit(&h->sei); ff_h264_sei_uninit(&h->sei);
} }
ret = ff_h2645_packet_split(&h->pkt, buf, buf_size, avctx, h->is_avc, ret = ff_h2645_packet_split(&h->pkt, buf, buf_size, avctx, h->is_avc,
h->nal_length_size, avctx->codec_id); h->nal_length_size, avctx->codec_id);
if (ret < 0) { if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, av_log(avctx, AV_LOG_ERROR,
"Error splitting the input into NAL units.\n"); "Error splitting the input into NAL units.\n");
skipping to change at line 760 skipping to change at line 761
if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS) && !h->cur_pic_ptr) { if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS) && !h->cur_pic_ptr) {
if (avctx->skip_frame >= AVDISCARD_NONREF) if (avctx->skip_frame >= AVDISCARD_NONREF)
return 0; return 0;
av_log(avctx, AV_LOG_ERROR, "no frame!\n"); av_log(avctx, AV_LOG_ERROR, "no frame!\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS) || if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS) ||
(h->mb_y >= h->mb_height && h->mb_height)) { (h->mb_y >= h->mb_height && h->mb_height)) {
ff_h264_field_end(h, &h->slice_ctx[0], 0); if (h->field_started)
ff_h264_field_end(h, &h->slice_ctx[0], 0);
*got_frame = 0; *got_frame = 0;
if (h->output_frame->buf[0]) { if (h->output_frame->buf[0]) {
ret = output_frame(h, pict, h->output_frame) ; ret = output_frame(h, pict, h->output_frame) ;
av_frame_unref(h->output_frame); av_frame_unref(h->output_frame);
if (ret < 0) if (ret < 0)
return ret; return ret;
*got_frame = 1; *got_frame = 1;
} }
} }
 End of changes. 4 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS