On Thu, Oct 23, 2014 at 10:23 PM, Michael Niedermayer <michae...@gmx.at> wrote: > why doesnt this write into err directly without ret ?
ffurl_open() returns >= 0 in case of success. Positive value of err can be confusing and can lead to unexpected behaviour, also at future changes (the modified function is quite large, so hard for thorough reviewing and accounting of all cases). So i did it this way to avoid introduction of any side effects. Even now there's such place (near line 1800): if (s->iformat && CONFIG_RTSP_DEMUXER) err = ff_rtsp_setup_input_streams(s, reply); else if (CONFIG_RTSP_MUXER) err = ff_rtsp_setup_output_streams(s, host); if (err) goto fail; there's no "just else" clause which sets err, and imagine that err was set to positive value by ffurl_open() by previous change. (I have no idea when "if" clause or "else if" clause gets executed in practice.) -- Bluecherry developer. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel