#6414(avformat:new): Possible unintended/unintended access to "pkt->dts"
#6414: Possible unintended/unintended access to "pkt->dts" ----------------------------------+-------------------------------------- Reporter: petrum | Type: defect Status: new | Priority: minor Component: avformat | Version: git-master Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ----------------------------------+-------------------------------------- While experimenting with a CodeSonar plugin we develop, we noticed a potential bug in file "FFmpeg/libavformat/mux.c" line 735: if (s->internal->avoid_negative_ts_use_pts) { if (pkt->pts != AV_NOPTS_VALUE && pkt->pts < 0) { av_log(s, AV_LOG_WARNING, "failed to avoid negative " "pts %s in stream %d.\n" "Try -avoid_negative_ts 1 as a possible workaround.\n", /*Line 735*/ av_ts2str(pkt->dts), pkt->stream_index ); } Shouldn't you access pkt->pts (instead of pkt->dts) as in the guard of the second if? Even the string message mentions "pts". How to reproduce: The issue has been detected directly at the source code level in the third party code of the chromium project that uses this code. -- Ticket URL: <https://trac.ffmpeg.org/ticket/6414> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#6414: Possible unintended/inconsistant access to "pkt->dts" ------------------------------------+------------------------------------ Reporter: petrum | Owner: Type: defect | Status: new Priority: minor | Component: avformat Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ -- Ticket URL: <https://trac.ffmpeg.org/ticket/6414#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#6414: Possible unintended/inconsistant access to "pkt->dts" ------------------------------------+------------------------------------ Reporter: petrum | Owner: Type: defect | Status: new Priority: minor | Component: avformat Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by heleppkes): It probably should, but its only logging so its hardly a bug worth writing home about. -- Ticket URL: <https://trac.ffmpeg.org/ticket/6414#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#6414: Possible unintended/inconsistant access to "pkt->dts" ------------------------------------+------------------------------------ Reporter: petrum | Owner: Type: defect | Status: closed Priority: minor | Component: avformat Version: git-master | Resolution: fixed Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Changes (by mkver): * status: new => closed * resolution: => fixed Comment: Fixed in 1a36354698fc0453ba4d337786d2cb4d3e374cfb. -- Ticket URL: <https://trac.ffmpeg.org/ticket/6414#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg