[Ffmpeg-devel] [PATCH] THP PCM decoder (GSoC Qualification)

Marco Gerards mgerards
Mon Apr 2 21:53:22 CEST 2007


Marco Gerards <mgerards at xs4all.nl> writes:

Hi,

> Michael Niedermayer <michaelni at gmx.at> writes:
>
> Hi,
>
>> On Mon, Apr 02, 2007 at 07:24:49PM +0200, Marco Gerards wrote:
>>> Baptiste Coudurier <baptiste.coudurier at smartjog.com> writes:
>> [...]
>>> >> [...]
>>> >> +    }
>>> >> +    else {
>>> >> +       ret = av_get_packet(pb, pkt, thp->audiosize);
>>> >> +       if (ret != thp->audiosize) {
>>> >> +          av_free_packet(pkt);
>>> >> +          return AVERROR_IO;
>>> >> +       }
>>> >> +      pkt->stream_index = thp->audio_stream_index;
>>> >> +      thp->audiosize = 0;
>>> >> +      thp->frame++;
>>> >
>>> > Can't seek be avoided now ? Does audio follow video in data stream ? If
>>> > so Im wondering if reading video + audio in the same time, using buffer
>>> > then output audio after, would not be cleaner and simpler.
>>> 
>>> It's convenient that I can make a video and audio packet and read
>>> simultaneously.  I think the code otherwise will get more complex.  Do
>>> you think it is worth the complexity and reading everything at once?
>>> 
>>> I do not think seeking can be avoided.  Some data follows the frame,
>>> it is not documented.  So there is a gap between the total framesize
>>> and the image+audio size.
>>
>> how does that extra data look ? (iam just curious ...)
>
> Urgh.  It was my mistake, I was printing the wrong values while I was
> debugging this code.  I take it back, there is no extra data...  I
> shouldn't code after studying for over 8 hours...

This comment was not very clear.  What I mean is that there is no
data, it just seems to be padding.  So it can be skipped.

--
Marco





More information about the ffmpeg-devel mailing list