[FFmpeg-devel] [RFC] ffplay dr1 + reget buffer issue
Jai Menon
jmenon86
Mon May 24 16:20:50 CEST 2010
On Mon, May 24, 2010 at 6:27 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Mon, May 24, 2010 at 06:27:15PM +0530, Jai Menon wrote:
>> 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
>
>> ?ffplay.c | ? 20 ++++++++++++++++++++
>> ?1 file changed, 20 insertions(+)
>> acd2fecd4ec5d912628594c38c5a79afefbae206 ?ffplay-reget-buffer.diff
>
> looks good now, if tested its also good to commit
thanks for the comments. it's well tested so committed.
--
Jai Menon
More information about the ffmpeg-devel
mailing list