[FFmpeg-devel] [RFC] ffplay dr1 + reget buffer issue
Michael Niedermayer
michaelni
Mon May 24 14:57:32 CEST 2010
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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100524/4d3e27bf/attachment.pgp>
More information about the ffmpeg-devel
mailing list