diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-12-01 12:27:01 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-12-03 15:04:26 +0400 |
commit | 089fac77a6bf9199a5ec161e9c27850f0a680541 (patch) | |
tree | ae28f83f4a578b7384964212782bdc9829e2583f /libavdevice | |
parent | 97d19c2fec351093652b9eef8ef030227aec57df (diff) |
alsa-audio-dec: explicitly cast the delay to a signed int64
Otherwise the expression will be evaluated as unsigned, which will break
when the result should be negative.
CC:libav-stable@libav.org
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/alsa-audio-dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavdevice/alsa-audio-dec.c b/libavdevice/alsa-audio-dec.c index 5b32ed980c..0687a4ad3d 100644 --- a/libavdevice/alsa-audio-dec.c +++ b/libavdevice/alsa-audio-dec.c @@ -142,7 +142,7 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt) ts_delay += res; pkt->pts = timestamp.tv_sec * 1000000LL + (timestamp.tv_nsec * st->codec->sample_rate - - ts_delay * 1000000000LL + st->codec->sample_rate * 500LL) + - (int64_t)ts_delay * 1000000000LL + st->codec->sample_rate * 500LL) / (st->codec->sample_rate * 1000LL); pkt->size = res * s->frame_size; |