diff options
Diffstat (limited to 'src/plugins/Input/mpeg')
| -rw-r--r-- | src/plugins/Input/mpeg/decodermpegfactory.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/Input/mpeg/decodermpegfactory.cpp b/src/plugins/Input/mpeg/decodermpegfactory.cpp index 0ca79374d..8d21e7bc3 100644 --- a/src/plugins/Input/mpeg/decodermpegfactory.cpp +++ b/src/plugins/Input/mpeg/decodermpegfactory.cpp @@ -119,10 +119,12 @@ bool DecoderMPEGFactory::canDecode(QIODevice *input) const { struct mad_stream stream; struct mad_header header; + struct mad_frame frame; int dec_res; mad_stream_init(&stream); mad_header_init(&header); + mad_frame_init(&frame); mad_stream_buffer (&stream, (unsigned char *) buf, dataSize); stream.error = MAD_ERROR_NONE; @@ -131,8 +133,10 @@ bool DecoderMPEGFactory::canDecode(QIODevice *input) const ; if(dec_res == 0) - dec_res = mad_header_decode(&header, &stream); + dec_res = mad_frame_decode(&frame, &stream); + mad_stream_finish(&stream); + mad_frame_finish(&frame); return dec_res == 0; } #endif |
