|
@@ -269,7 +269,7 @@ long initDecoder(const char *url, int force_Iframe, DisableMediaType disableMedi
|
|
|
close_decoder((long) dctx);
|
|
|
return ret;
|
|
|
}
|
|
|
- dctx->audio_queue = new BlockQueue<AVFrame *>(dctx->fps);
|
|
|
+// dctx->audio_queue = new BlockQueue<AVFrame *>(dctx->fps);
|
|
|
dctx->video_queue = new BlockQueue<AVFrame *>(dctx->fps);
|
|
|
}
|
|
|
|
|
@@ -316,6 +316,7 @@ void seekToMs(DecoderContext *dctx, int64_t offset) {
|
|
|
}
|
|
|
|
|
|
void close_decoder(long decodec_id) {
|
|
|
+ LOGE("close_decoder \n");
|
|
|
if (decodec_id > 0) {
|
|
|
struct DecoderContext *ctx = (struct DecoderContext *) decodec_id;
|
|
|
if (ctx->url) {
|
|
@@ -368,7 +369,9 @@ void close_decoder(long decodec_id) {
|
|
|
}
|
|
|
free(ctx);
|
|
|
ctx = NULL;
|
|
|
+
|
|
|
}
|
|
|
+ LOGE("close_decoder out\n");
|
|
|
}
|
|
|
|
|
|
int av_read_decode_frame(long decodec_id) {
|
|
@@ -446,8 +449,13 @@ void *av_read_decode_thread(void *pVoid) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- ctx->audio_queue->PushBack(NULL);
|
|
|
+ if (ctx->audio_queue){
|
|
|
+ LOGE("push empty packet audio !\n");
|
|
|
+ ctx->audio_queue->PushBack(NULL);
|
|
|
+ }
|
|
|
+ LOGE("push empty packet video !\n");
|
|
|
ctx->video_queue->PushBack(NULL);
|
|
|
}
|
|
|
+ LOGE("read thread exit !\n");
|
|
|
pthread_exit(NULL);
|
|
|
}
|