[FFmpeg-devel] [RFC] ffplay dr1 + reget buffer issue
Jai Menon
jmenon86
Mon May 24 14:57:15 CEST 2010
On Mon, May 24, 2010 at 4:14 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Mon, May 24, 2010 at 11:39:13AM +0530, Jai Menon wrote:
>> On Mon, May 24, 2010 at 5:55 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
[...]
>> ?ffplay.c | ? 16 ++++++++++++++++
>> ?1 file changed, 16 insertions(+)
>> 03b737d84bf45dbc1a3065ae971060614aee6e71 ?ffplay-reget-buffer.diff
>> diff --git a/ffplay.c b/ffplay.c
>> index a48891e..a5e3287 100644
>> --- a/ffplay.c
>> +++ b/ffplay.c
>> @@ -1607,6 +1607,21 @@ static void input_release_buffer(AVCodecContext *codec, AVFrame *pic)
>> ? ? ?avfilter_unref_pic(pic->opaque);
>> ?}
>>
>> +static int input_reget_buffer(AVCodecContext *codec, AVFrame *pic)
>> +{
>> + ? ?AVFilterPicRef *ref = pic->opaque;
>> +
>> + ? ?if(pic->data[0] == NULL ||
>> + ? ? ? (codec->width != ref->w) || (codec->height != ref->h) ||
>> + ? ? ? (codec->pix_fmt != ref->pic->format)) {
>> + ? ? ? ?pic->buffer_hints |= FF_BUFFER_HINTS_READABLE;
>> + ? ? ? ?return codec->get_buffer(codec, pic);
>> + ? ?}
>
> i think mismatching w/h/pixfmt should print an error
right, attached.
--
Jai Menon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffplay-reget-buffer.diff
Type: text/x-patch
Size: 1226 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100524/5158dc82/attachment.bin>
More information about the ffmpeg-devel
mailing list