mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Fix bug: local id variable overwrites argument.
This commit is contained in:
parent
9170fcf485
commit
6775173e4f
10
softhddev.c
10
softhddev.c
@ -424,24 +424,24 @@ int PlayAudio(const uint8_t * data, int size, uint8_t id)
|
|||||||
// FIXME: otherwise it takes too long until sound appears
|
// FIXME: otherwise it takes too long until sound appears
|
||||||
|
|
||||||
if (AudioCodecID == CODEC_ID_NONE) {
|
if (AudioCodecID == CODEC_ID_NONE) {
|
||||||
int id;
|
int codec_id;
|
||||||
|
|
||||||
Debug(3, "[softhddev]%s: ??? %d\n", __FUNCTION__, id);
|
Debug(3, "[softhddev]%s: ??? %d\n", __FUNCTION__, id);
|
||||||
avpkt->data = (void *)data;
|
avpkt->data = (void *)data;
|
||||||
avpkt->size = size;
|
avpkt->size = size;
|
||||||
if (AudioChannelID == 0xBD) {
|
if (AudioChannelID == 0xBD) {
|
||||||
n = FindDolbySync(avpkt);
|
n = FindDolbySync(avpkt);
|
||||||
id = CODEC_ID_AC3;
|
codec_id = CODEC_ID_AC3;
|
||||||
} else {
|
} else {
|
||||||
n = FindAudioSync(avpkt);
|
n = FindAudioSync(avpkt);
|
||||||
id = CODEC_ID_MP2;
|
codec_id = CODEC_ID_MP2;
|
||||||
}
|
}
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
return osize;
|
return osize;
|
||||||
}
|
}
|
||||||
|
|
||||||
CodecAudioOpen(MyAudioDecoder, NULL, id);
|
CodecAudioOpen(MyAudioDecoder, NULL, codec_id);
|
||||||
AudioCodecID = id;
|
AudioCodecID = codec_id;
|
||||||
data += n;
|
data += n;
|
||||||
size -= n;
|
size -= n;
|
||||||
avpkt->pts = AV_NOPTS_VALUE;
|
avpkt->pts = AV_NOPTS_VALUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user