summaryrefslogtreecommitdiff
path: root/dxr3audiodecoder.h
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2009-12-07 16:53:59 +0100
committerChristian Gmeiner <christian.gmeiner@gmail.com>2009-12-07 16:53:59 +0100
commit961b570ff897b54beabdcb4c54e59049203ce10a (patch)
tree8f672bbe988293a85af5b2ea490d3b6721f50e5e /dxr3audiodecoder.h
parentdf49033f6ed44ad04c7c273e371484f42c81cd8e (diff)
downloadvdr-plugin-dxr3-961b570ff897b54beabdcb4c54e59049203ce10a.tar.gz
vdr-plugin-dxr3-961b570ff897b54beabdcb4c54e59049203ce10a.tar.bz2
fixed bug #169
ffmpep warns that the frame size is incorrect. To fix this warning, we calcuate the frame size based on the mpeg audio header. This calculated value is used for avcodec_decode_audio functions.
Diffstat (limited to 'dxr3audiodecoder.h')
-rw-r--r--dxr3audiodecoder.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/dxr3audiodecoder.h b/dxr3audiodecoder.h
index 48b526b..7b0262f 100644
--- a/dxr3audiodecoder.h
+++ b/dxr3audiodecoder.h
@@ -55,6 +55,7 @@ public:
private:
bool checkMpegAudioHdr(const uint8_t *head);
+ int calcFrameSize(const uint8_t *header);
AVCodec *audio;
AVCodecContext *contextAudio;
@@ -63,6 +64,7 @@ private:
cRingBufferFrame rbuf;
cMultichannelAudio ac3dtsDecoder;
+ int frameSize;
uint8_t lastBitrate;
uint8_t pcmbuf[AVCODEC_MAX_AUDIO_FRAME_SIZE];
};