[FFmpeg-devel] [PATCH] RTSP-MS 15/15: move packet_time_start zero value assignment in asf.c
Ronald S. Bultje
rsbultje
Thu Apr 16 20:12:31 CEST 2009
Hi,
On Thu, Apr 16, 2009 at 2:04 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Thu, Apr 16, 2009 at 01:55:35PM -0400, Ronald S. Bultje wrote:
>> On Thu, Apr 16, 2009 at 1:15 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> > The check you remove IS the EOF check it just returns EIO as it was
>> > written prior to EOF being used
>>
>> No, that check is the one that I just changed to AVERROR_EOF in my
>
> that, is the second EOF check
OK, looking at this piece of code in ffplay.c:
ret = av_read_frame(ic, pkt);
if (ret < 0) {
if (ret != AVERROR_EOF && url_ferror(ic->pb) == 0) {
SDL_Delay(100); /* wait for user event */
continue;
} else
break;
}
OK if I change the AVERROR(EIO) to AVERROR_EOF then? (Yes, tested,
just like all my previous patches, and playback keeps working and EOF
is now properly recognized and playback terminated accordingly.)
Ronald
-------------- next part --------------
Index: libavformat/asfdec.c
===================================================================
--- libavformat/asfdec.c (revision 18531)
+++ libavformat/asfdec.c (working copy)
@@ -715,7 +715,7 @@
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 */
+ return AVERROR_EOF; /* Do not exceed the size of the data object */
return 1;
}
if (asf->packet_time_start == 0) {
More information about the ffmpeg-devel
mailing list