~ppsspp/ppsspp/ffmpeg-upstream

« back to all changes in this revision

Viewing changes to libavcodec/h264_refs.c

  • Committer: Sérgio Benjamim
  • Date: 2015-07-20 03:55:05 UTC
  • Revision ID: sergio_br2@yahoo.com.br-20150720035505-i1jj1zcjcnd0mc7w
Updated to 2.7.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
int ff_h264_fill_default_ref_list(H264Context *h, H264SliceContext *sl)
126
126
{
127
127
    int i, len;
 
128
    int j;
128
129
 
129
130
    if (sl->slice_type_nos == AV_PICTURE_TYPE_B) {
130
131
        H264Picture *sorted[32];
188
189
        }
189
190
    }
190
191
#endif
 
192
 
 
193
    for (j = 0; j<1+(sl->slice_type_nos == AV_PICTURE_TYPE_B); j++) {
 
194
        for (i = 0; i < sl->ref_count[j]; i++) {
 
195
            if (h->default_ref_list[j][i].parent) {
 
196
                AVFrame *f = h->default_ref_list[j][i].parent->f;
 
197
                if (h->cur_pic_ptr->f->width  != f->width ||
 
198
                    h->cur_pic_ptr->f->height != f->height ||
 
199
                    h->cur_pic_ptr->f->format != f->format) {
 
200
                    av_log(h->avctx, AV_LOG_ERROR, "Discarding mismatching reference\n");
 
201
                    memset(&h->default_ref_list[j][i], 0, sizeof(h->default_ref_list[j][i]));
 
202
                }
 
203
            }
 
204
        }
 
205
    }
 
206
 
191
207
    return 0;
192
208
}
193
209