On niedziela, 30 marca 2008, Michael Niedermayer wrote: > Note, to add the header into the buffer calling ff_combine_frame() with > END_NOT_FOUND and a smaller buffer size should work. > > After its in the buffer you just run the header decoder thing over the > header and when you know the final frame size you call ff_combine_frame > with appropriate next value. > > Anyway iam not insisting on you changing the current aac/ac3 parser to use > ff_combine_frame() > But what you will end up implementing will be quite similar in > functionality to ff_combine_frame() > > [...]
Hmm... I tried to implement it using ff_combine_frame, but the code which I got is in my opinion significantly worse. Main problems which I had: -ff_combine_frame is rather adapted to using on one frame, when in buffer is one frame and it currently reads the next one it isn't convenient (the whole buffer size is not just a new frame's size, so that we should remember size of earlier frames). -in the genuine code there is memmove(s->frame_start, s->frame_start + 1, s->header_size - 1); s->frame_ptr--; here we can operate on pc->buffer and pc->index (remembering also where the new frame begins). However, surely it isn't the simpliest solution... Because of that I don't know what to do: -leave the code as it is, -use ff_combine_frame, -write new functions which will operate on the buffer (similar to ff_combine_frame, but adapted to the needs of aac_ac3_parser)? -- Bartlomiej Wolowiec _______________________________________________ FFmpeg-soc mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
