Revision 12bd3c1f ffplay.c
ffplay.c | ||
---|---|---|
1609 | 1609 |
avfilter_unref_pic(pic->opaque); |
1610 | 1610 |
} |
1611 | 1611 |
|
1612 |
static int input_reget_buffer(AVCodecContext *codec, AVFrame *pic) |
|
1613 |
{ |
|
1614 |
AVFilterPicRef *ref = pic->opaque; |
|
1615 |
|
|
1616 |
if (pic->data[0] == NULL) { |
|
1617 |
pic->buffer_hints |= FF_BUFFER_HINTS_READABLE; |
|
1618 |
return codec->get_buffer(codec, pic); |
|
1619 |
} |
|
1620 |
|
|
1621 |
if ((codec->width != ref->w) || (codec->height != ref->h) || |
|
1622 |
(codec->pix_fmt != ref->pic->format)) { |
|
1623 |
av_log(codec, AV_LOG_ERROR, "Picture properties changed.\n"); |
|
1624 |
return -1; |
|
1625 |
} |
|
1626 |
|
|
1627 |
pic->reordered_opaque = codec->reordered_opaque; |
|
1628 |
return 0; |
|
1629 |
} |
|
1630 |
|
|
1612 | 1631 |
static int input_init(AVFilterContext *ctx, const char *args, void *opaque) |
1613 | 1632 |
{ |
1614 | 1633 |
FilterPriv *priv = ctx->priv; |
... | ... | |
1622 | 1641 |
priv->use_dr1 = 1; |
1623 | 1642 |
codec->get_buffer = input_get_buffer; |
1624 | 1643 |
codec->release_buffer = input_release_buffer; |
1644 |
codec->reget_buffer = input_reget_buffer; |
|
1625 | 1645 |
} |
1626 | 1646 |
|
1627 | 1647 |
priv->frame = avcodec_alloc_frame(); |
Also available in: Unified diff