[vlc-devel] demux: adaptive: fix a zero-divid bug.

Zhao Zhili quinkblack at foxmail.com
Mon Nov 26 07:47:58 CET 2018


On 2018/11/26 下午2:32, Xie Zhigang wrote:
>
> ________________________________
> 发件人: Zhao Zhili <quinkblack at foxmail.com>
> 发送时间: 2018年11月24日 14:04
> 收件人: Xie Zhigang
> 抄送: vlc-devel at videolan.org
> 主题: Re: [vlc-devel] demux: adaptive: fix a zero-divid bug.
>
> Built from source, git tag 3.0.0-git, commit 8d432b0.

It has been fixed by
https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commit;h=a9481adb172fde9a1892483a31a67a82e399c384
and
https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commit;h=67972f975e09227ca943d0d8a0ffdd763d1e1717

Please update to a new tag.

>
>> On Nov 24, 2018, at 11:55 AM, Xie Zhigang <zighouse at hotmail.com> wrote:
>>
>> Hi Zhao,
>> I found it at vlc-3.0.0 on Windows-7. This bug is not easy to repeat but I encountered it twice at night automatic testing loop of play-stop-sequence for an unstable hls stream via wifi. The hls stream is created by a shell script which building a gstreamer pipeline. If the pipeline is down, restart the script automatically.
> The last released version of vlc on Windows is 3.0.4 (https://www.videolan.org/). Could you share more information about the version?
> If you build it from source code, what's the git sha-1?
>
>> The pipeline scipt is something like:
>>
>> gst-launch-1.0 mpegtsmux name=m ! \
>>    hlssink target-duration=2 max-files=15 playlist-length=5 location=media/s%05d.ts \
>>    playlist-location=media/playlist.m3u8 \
>> udpsrc port=$aport ! \
>>    application/x-rtp, media=audio, playload=0, clock-rate=8000, rate=8000 ! \
>>    rptpcmudepay ! mulawdec ! \
>>    audioconvert ! audioresample ! audio/x-raw, rate=44100 ! \
>>    queue ! voaacenc bitrate=96000 hard-resync=true ! queue ! \
>>    m. \
>> udpsrc port=$vport ! \
>>    application/x-rtp, payload=106, clock-rate=90000 ! \
>>    rtpjitterbuffer latency=100 ! \
>>    rtph264depay ! h264parse ! avdec_h264 ! \
>>    videoconvert ! videorate ! video/x-raw, framerate=15/1 ! queue ! \
>>   x264enc bframes=0 ! queue ! \
>>   h264parse config-interval=1 ! m.
>>
>> And, I use tcpreplay to replay a pcap in a loop-way to inject audio- and video- element streams into udp ports constantly.
>> 发件人: vlc-devel <vlc-devel-bounces at videolan.org> 代表 Zhao Zhili <quinkblack at foxmail.com>
>> 发送时间: 2018年11月22日 11:00
>> 收件人: vlc-devel at videolan.org
>> 主题: Re: [vlc-devel] demux: adaptive: fix a zero-divid bug.
>>
>> Hi Xie,
>> What's the version of VLC has this bug?
>> If NearOptimalAdaptationLogic has this problem, then other
>> AdaptationLogics have this problem too, so this patch is not complete.
>> On the other hand, modules/demux/adaptive/http/Chunk.cpp doesn't call
>> updateDownloadRate if time is zero. I don't know how this can happen.
>>
>> On 2018/11/15 下午6:49, Xie Zhigang wrote:
>>> fixes crashs on some cases with zero update download rates.
>>> ---
>>>    modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp | 3 +++
>>>    1 file changed, 3 insertions(+)
>>>
>>> diff --git a/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp b/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
>>> index 1c99538..32bb863 100644
>>> --- a/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
>>> +++ b/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
>>> @@ -179,6 +179,9 @@ unsigned NearOptimalAdaptationLogic::getMaxCurrentBw() const
>>>
>>>    void NearOptimalAdaptationLogic::updateDownloadRate(const ID &id, size_t dlsize, vlc_tick_t time)
>>>    {
>>> +    if (time <= 0)
>>> +        return;
>>> +
>>>        vlc_mutex_lock(&lock);
>>>        std::map<ID, NearOptimalContext>::iterator it = streams.find(id);
>>>        if(it != streams.end())
>>
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel





More information about the vlc-devel mailing list