[Title] modify audio decoder part.
authorKitae Kim <kt920.kim@samsung.com>
Wed, 29 Aug 2012 12:53:13 +0000 (21:53 +0900)
committerKitae Kim <kt920.kim@samsung.com>
Wed, 29 Aug 2012 12:53:13 +0000 (21:53 +0900)
[Type] bug fix
[Module] emulator / codec
[Priority]
[CQ#]
[Redmine#]
[Problem] sample rate of audio can be changed after decoding.
[Cause]
[Solution] need to copy the value from qemu to guest.
[TestCase]

tizen/src/hw/maru_codec.c

index a0e889cbdfbe1dca363b6de6f5bcb630af50d166..30bd07c3dd8e6fa4e8ea313e2ef63194d38893bc 100644 (file)
@@ -948,6 +948,10 @@ int qemu_avcodec_decode_audio(SVCodecState *s, int ctx_index)
 
     memcpy((uint8_t *)s->vaddr + offset, &avctx->bit_rate, sizeof(int));
     size = sizeof(int);
+    memcpy((uint8_t *)s->vaddr + offset + size, &avctx->sample_rate, sizeof(int));
+    size += sizeof(int);
+    memcpy((uint8_t *)s->vaddr + offset + size, &avctx->channels, sizeof(int));
+    size += sizeof(int);
     memcpy((uint8_t *)s->vaddr + offset + size, &avctx->sub_id, sizeof(int));
     size += sizeof(int);
     memcpy((uint8_t *)s->vaddr + offset + size,