[FFmpeg-devel] rtsp.c udp_read_packet() fails to return when stream ends, simple fix
Ronald S. Bultje
rsbultje
Thu Mar 25 22:33:13 CET 2010
Hi,
On Thu, Mar 25, 2010 at 5:25 PM, Sam Gerstein <sgerstein at bluefinlab.com> wrote:
> On Thu, Mar 25, 2010 at 3:12 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
>> } else if (n == 0 && ++timeout_cnt >= MAX_TIMEOUTS) {
>> ? ?return AVERROR(ETIME);
>> } else if (errno != EINTR)
>> ? ?return errno;
>>
>> 4 lines instead of 10. :-).
>
> That doesn't mean the same thing. ?I kept my nested ifs separate to
> avoid exactly that kind of problem.
> You prefer I remove the comments?
Yeah, they're self-explanatory. Also remove the if (..) { <-- this one
.. } <-- this one brackets wherever they cost you an extra line of
code.
Ronald
More information about the ffmpeg-devel
mailing list