[FFmpeg-devel] [PATCH] Patches to fix issue453 in libdiracschroedinger

Michael Niedermayer michaelni
Tue Jun 3 23:48:04 CEST 2008


On Sun, Jun 01, 2008 at 06:03:12PM +1000, Anuradha Suraparaju wrote:
> Hi, 
> 
> I have addressed most of the issues mentioned in your email in the new
> patches. 
[...]

> > [...]
> > > Index: libavcodec/dirac_parser.c
> > > ===================================================================
> > > --- libavcodec/dirac_parser.c	(revision 13233)
> > > +++ libavcodec/dirac_parser.c	(working copy)
> > > @@ -62,16 +62,12 @@
> > >      ParseContext *pc = s->priv_data;
> > >      int next;
> > >  
> > > -    if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) {
> > > -        next = buf_size;
> > > -    }else{
> > > -        next = find_frame_end(pc, buf, buf_size);
> > > +    next = find_frame_end(pc, buf, buf_size);
> > >  
> > > -        if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
> > > -            *poutbuf = NULL;
> > > -            *poutbuf_size = 0;
> > > -            return buf_size;
> > > -        }
> > > +    if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
> > > +        *poutbuf = NULL;
> > > +        *poutbuf_size = 0;
> > > +        return buf_size;
> > >      }
> > >  
> > >      *poutbuf = buf;
> > 
> > The current code in dirac_parser.c looks correct to me, this change should
> > not be needed.
> > PARSER_FLAG_COMPLETE_FRAMES is supposed to mean "complete" in the ffmpeg
> > sense.
> > 
> 
> As I mentioned in another email, libschroedinger requires that packet
> sent to it be Dirac byte stream parse units. If a packet contains more
> than one parse-unit the second gets ignored. Hence the change I made is
> required.

What ffmpeg calls complete frames is what a parser should output, hence
if PARSER_FLAG_COMPLETE_FRAMES is set there is no spliting to do for a
parser.

If i understand the current code correctly the parser does not behave that
way and the decoder would not work if it did.
If true -vcodec copy will likely not work with dirac currently


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- 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/20080603/8ffdc5b7/attachment.pgp>



More information about the ffmpeg-devel mailing list