if (ret < 0)
return ret;
- if (!s->current_picture.f->data[0]) {
+ if (!s->current_picture.f || !s->current_picture.f->data[0]) {
av_log(avctx, AV_LOG_ERROR, "Got no sprites\n");
return -1;
}
Since we can't enforce it, clear to black the missing sprite. This is
wrong but it looks better than doing nothing. */
- if (f->data[0])
+ if (f && f->data[0])
for (plane = 0; plane < (s->flags&CODEC_FLAG_GRAY ? 1 : 3); plane++)
for (i = 0; i < v->sprite_height>>!!plane; i++)
memset(f->data[plane] + i * f->linesize[plane],
av_freep(&v->sr_rows[i >> 1][i & 1]);
av_freep(&v->hrd_rate);
av_freep(&v->hrd_buffer);
- ff_MPV_common_end(&v->s);
+ ff_mpv_common_end(&v->s);
av_freep(&v->mv_type_mb_plane);
av_freep(&v->direct_mb_plane);
av_freep(&v->forward_mb_plane);
if (ff_msmpeg4_decode_init(avctx) < 0)
goto err;
if (ff_vc1_decode_init_alloc_tables(v) < 0) {
- ff_MPV_common_end(s);
+ ff_mpv_common_end(s);
goto err;
}
s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I;
/* skip B-frames if we don't have reference frames */
- if (s->last_picture_ptr == NULL && (s->pict_type == AV_PICTURE_TYPE_B || s->droppable)) {
+ if (!s->last_picture_ptr && (s->pict_type == AV_PICTURE_TYPE_B || s->droppable)) {
av_log(v->s.avctx, AV_LOG_DEBUG, "Skipping B frame without reference frames\n");
goto end;
}
s->next_p_frame_damaged = 0;
}
- if (ff_MPV_frame_start(s, avctx) < 0) {
+ if (ff_mpv_frame_start(s, avctx) < 0) {
goto err;
}
ff_er_frame_end(&s->er);
}
- ff_MPV_frame_end(s);
+ ff_mpv_frame_end(s);
if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
image:
goto err;
ff_print_debug_info(s, s->current_picture_ptr, pict);
*got_frame = 1;
- } else if (s->last_picture_ptr != NULL) {
+ } else if (s->last_picture_ptr) {
if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
goto err;
ff_print_debug_info(s, s->last_picture_ptr, pict);