//haveToCopy -= badMinimumFunction(len - decompress_buffer_filled, 0);
//*samplepos += badMinimumFunction(len - decompress_buffer_filled, 0);
- int result = badMinimumFunction(len - decompress_buffer_filled, 0);
- haveToCopy -= result;
- *samplepos += result;
-
- abort(); // When does this run?
+ //int result = badMinimumFunction(len - decompress_buffer_filled, 0);
+ //LogNT::getInstance()->debug(TAG, "RESULT : {}", result);
+ //haveToCopy -= result;
+ //*samplepos += result;
+
+ //abort(); // When does this run?
+ // 18 months later... This abort finally triggered. There now seems to be some channels which trigger this.
+ // It's when there's not enough data to decode. This particular bit of code is after this half block
+ // situation has occured, there is code above which glues the old saved data to new input and runs that
+ // through libav. This is the cleanup code after this has happened. But - as it was written it never did
+ // anything. haveToCopy and *samplepos were not moved. However - it works !! Why?? Is it leaking somehow?
+ // Removing the abort
+ // Removing the badMinimumFunction
+ // Commenting out the above lines which move haveToCopy and *samplepos
+ // Figure out in a future refactor if this needs further fixing
// len is always either 0 or the result of avcodec_decode_audio4(current_context, decode_frame_libav, &gotta, &incoming_paket_libav);
//if (current_context->frame_size>0) framesize=min(current_context->frame_size,haveToCopy);
/*else*/ framesize = haveToCopy;
+
}
else
{
vw->ResetTimeOffsets();
}
-// FIXME
+/*
int AudioOMX::badMinimumFunction(u4 a, int b)
{
printf("MIN: P1: %u, P2: %i\n", a, b);
if (a > b) return b;
else return a;
}
+*/
int AudioOMX::DO_NOT_USE(AVCodecContext* avctx, // used - sent to avcodec_send_packet
AVFrame* frame, // used - object for receive to write to
char L_VPE_OMX_AUDIO_REND[128];
- int badMinimumFunction(u4 a, int b);
+ // int badMinimumFunction(u4 a, int b);
int DO_NOT_USE(AVCodecContext* avctx, AVFrame* frame, int* got_frame_ptr, const AVPacket* avpkt);
};