[FFmpeg-devel] [PATCH] RTSP-MS 15/15: move packet_time_start zero value assignment in asf.c
Michael Niedermayer
michaelni
Thu Apr 16 16:30:13 CEST 2009
On Thu, Apr 16, 2009 at 10:14:59AM -0400, Ronald S. Bultje wrote:
> Hi,
>
> On Wed, Apr 15, 2009 at 11:13 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Wed, Apr 15, 2009 at 09:36:47PM -0400, Ronald S. Bultje wrote:
> >> Shit... I hate you. :-).
> >
> > good :)
>
> /me looks doubtful
>
> > yes, url_fseek/skip() clears eof but the first get_byte() or whatever
> > will notice it has no data and call fill_buffer() that will set eof_reached
> > again, so unless you check for eof straight after a url_fskip/seek it should
> > give the correct value
>
> Indeed. Which doesn't happen. Yesterday I blindly assumed it'd call
> get_byte() etc. somewhere. It doesn't. It gets stuck here (EOF is not
> set) in parse_packet():
>
> if (asf->packet_size_left < FRAME_HEADER_SIZE
> || asf->packet_segments < 1) {
> //asf->packet_size_left <= asf->packet_padsize) {
> int ret = asf->packet_size_left + asf->packet_padsize;
> //printf("PacketLeftSize:%d Pad:%d Pos:%"PRId64"\n",
> asf->packet_size_left, asf->packet_padsize, url_ftell(pb));
> assert(ret>=0);
> /* fail safe */
> url_fskip(pb, ret);
>
> asf->packet_pos= url_ftell(pb);
> if (asf->data_object_size != (uint64_t)-1 &&
> (asf->packet_pos - asf->data_object_offset >=
> asf->data_object_size))
> return AVERROR(EIO); /* Do not exceed the size of the
> data object */
>
> Returning EIO, which causes a return of EIO to ffplay. Ffplay then
> checks for EOF, isn't there, reruns and we re-enter this loop. We
> never read a single byte, we just skip.
If asf finds an inconsistancy it should try to resync not return EIO
>
> I still think we should add some EOF check to url_fskip() or url_fseek()...
i dont see how, and its not the issue anyway
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- 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/20090416/1207642b/attachment.pgp>
More information about the ffmpeg-devel
mailing list