Feature: modify to release_retriever()

pull/221/head
xufuji456 3 years ago
parent 7d3fb3b6fd
commit 834a68f372
  1. 2
      app/src/main/cpp/metadata/ffmpeg_media_retriever.c
  2. 2
      app/src/main/cpp/metadata/ffmpeg_media_retriever.h
  3. 2
      app/src/main/cpp/metadata/media_retriever.cpp

@ -691,7 +691,7 @@ int set_native_window(State **state_ptr, ANativeWindow* native_window) {
return SUCCESS; return SUCCESS;
} }
void release(State **state_ptr) { void release_retriever(State **state_ptr) {
State *state = *state_ptr; State *state = *state_ptr;

@ -56,6 +56,6 @@ int get_frame_at_time(State **ps, int64_t timeUs, int option, AVPacket *pkt);
int get_scaled_frame_at_time(State **ps, int64_t timeUs, int option, AVPacket *pkt, int width, int height); int get_scaled_frame_at_time(State **ps, int64_t timeUs, int option, AVPacket *pkt, int width, int height);
int get_audio_thumbnail(State **state_ptr, AVPacket *pkt); int get_audio_thumbnail(State **state_ptr, AVPacket *pkt);
int set_native_window(State **ps, ANativeWindow* native_window); int set_native_window(State **ps, ANativeWindow* native_window);
void release(State **ps); void release_retriever(State **ps);
#endif /*FFMPEG_MEDIA_RETRIEVER_H_*/ #endif /*FFMPEG_MEDIA_RETRIEVER_H_*/

@ -14,7 +14,7 @@ MediaRetriever::MediaRetriever()
MediaRetriever::~MediaRetriever() MediaRetriever::~MediaRetriever()
{ {
Mutex::Autolock lock(mLock); Mutex::Autolock lock(mLock);
::release(&state); ::release_retriever(&state);
} }
int MediaRetriever::setDataSource(const char *srcUrl) int MediaRetriever::setDataSource(const char *srcUrl)

Loading…
Cancel
Save