1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 09:48:45 -05:00

DATV demod: Fixed deprecation (2)

This commit is contained in:
f4exb 2019-03-20 17:44:26 +01:00
parent eabb6a0c47
commit 80a25cc8fb

View File

@ -257,6 +257,10 @@ bool DATVideoRender::PreprocessStream()
qDebug() << "DATVideoProcess::PreprocessStream cannot find associated video CODEC"; qDebug() << "DATVideoProcess::PreprocessStream cannot find associated video CODEC";
return false; return false;
} }
else
{
qDebug() << "DATVideoProcess::PreprocessStream: video CODEC found: " << videoCodec->name;
}
av_dict_set(&opts, "refcounted_frames", "1", 0); av_dict_set(&opts, "refcounted_frames", "1", 0);
@ -571,7 +575,8 @@ bool DATVideoRender::RenderStream()
av_frame_unref(m_frame); av_frame_unref(m_frame);
gotFrame = 0; gotFrame = 0;
if (avcodec_decode_audio4(m_audioDecoderCtx, m_frame, &gotFrame, &packet) >= 0) if (new_decode(m_audioDecoderCtx, m_frame, &gotFrame, &packet) >= 0)
//if (avcodec_decode_audio4(m_audioDecoderCtx, m_frame, &gotFrame, &packet) >= 0) // old style
{ {
if (gotFrame) if (gotFrame)
{ {
@ -609,6 +614,10 @@ bool DATVideoRender::RenderStream()
m_audioTestIndex = i; m_audioTestIndex = i;
} }
} }
else
{
qDebug("DATVideoRender::RenderStream: audio decode error");
}
} }
av_packet_unref(&packet); av_packet_unref(&packet);