[FFmpeg-cvslog] r12759 -?in?trunk/libavcodec:?aac_ac3_parser.c?aac_ac3_parser.h?aac_parser. c?ac3_parser.c

Bartlomiej Wolowiec bartek.wolowiec
Fri Apr 18 12:14:54 CEST 2008


On pi?tek, 18 kwietnia 2008, Michael Niedermayer wrote:
> On Fri, Apr 18, 2008 at 12:10:35AM +0200, Bartlomiej Wolowiec wrote:
> > Hi, I think that I got lost somewhere, because I can't see the main goal
> > of this...
>
> The main goal is to pass values which represent the truth and check the
> return value of ff_combine_frame()
> what you do is a little like malloc(7) and use 8 bytes because malloc
> happens to round it up internally.
>
> > Generally, I hope that you thought about a? solution like the solution in
> > attachment (or something in this direction).
>
> i wanted you to add checks for the return value of ff_combine_frame() and
> to pass a truthfull parameter which says if you found a frame boundary.
> You still do not do this, you still explicitly check for EOF and then
> provide ff_combine_frame() with a fake "i found a startcode here at 0".
> If that was true it would also be if buf_size>0 but in that case its not
> so it cannot be true if buf_size==0.
>
> So please remove the buf_size==0 check.

Ok, there is no check of buf_size==0 now, when buf_size==0 END_NOT_FOUND  is 
sent.

> Also the code was working without such checks already, it just failed at
> EOF when ff_combine_frame() told you that it had a frame but your code
> continued as if ff_combine_frame() had none.

After calling ff_combine_frame I added check of buf_size==0, to check whether 
there is  anything in the buffer.

> besides this, the code now is completely reordered and its somewhat hard
> to check the correctness of the new code. at least the frame_in_buffer
> code is buggy now though.

after rebuilding it more readable for me.I moved the condition with 
frame_in_buffer few lines up, so that it should work now.

> Anyway i really dont care if the code uses a while() or the new variant
> which is turned inside out with a goto.
> [...]

I've changed to while().

-- 
Bartlomiej Wolowiec
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parser.patch
Type: text/x-diff
Size: 7499 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20080418/c00c7a3f/attachment.patch>



More information about the ffmpeg-cvslog mailing list