Mercurial > libavcodec.hg
comparison h264.c @ 11135:af73d215879d libavcodec
Dont drop B frames without last_picture.
Fixes issue1722
author | michael |
---|---|
date | Fri, 12 Feb 2010 23:28:33 +0000 |
parents | 1f13ac0e696b |
children | d9725977b699 |
comparison
equal
deleted
inserted
replaced
11134:31bdf73a0330 | 11135:af73d215879d |
---|---|
1713 } | 1713 } |
1714 h->slice_type= slice_type; | 1714 h->slice_type= slice_type; |
1715 h->slice_type_nos= slice_type & 3; | 1715 h->slice_type_nos= slice_type & 3; |
1716 | 1716 |
1717 s->pict_type= h->slice_type; // to make a few old functions happy, it's wrong though | 1717 s->pict_type= h->slice_type; // to make a few old functions happy, it's wrong though |
1718 if (s->pict_type == FF_B_TYPE && s0->last_picture_ptr == NULL) { | |
1719 av_log(h->s.avctx, AV_LOG_ERROR, | |
1720 "B picture before any references, skipping\n"); | |
1721 return -1; | |
1722 } | |
1723 | 1718 |
1724 pps_id= get_ue_golomb(&s->gb); | 1719 pps_id= get_ue_golomb(&s->gb); |
1725 if(pps_id>=MAX_PPS_COUNT){ | 1720 if(pps_id>=MAX_PPS_COUNT){ |
1726 av_log(h->s.avctx, AV_LOG_ERROR, "pps_id out of range\n"); | 1721 av_log(h->s.avctx, AV_LOG_ERROR, "pps_id out of range\n"); |
1727 return -1; | 1722 return -1; |