On FFmpegExtractor destructor it always call
packet_queue_destroy. However packet_queue_init
may not be called if there is an error inside
initStreams. Causing packet_queue_destroy trying
to free some random data in mVideoQ and mAudioQ and
leading to crash.
OPO-775
Change-Id: Idded5f886a680f135d6e004977c85135e40d02f1
fetchStuffsFromSniffedMeta(meta);
+ packet_queue_init(&mVideoQ);
+ packet_queue_init(&mAudioQ);
+
int err = initStreams();
if (err < 0) {
ALOGE("failed to init ffmpeg");
hours, mins, secs, (100 * us) / AV_TIME_BASE);
}
- packet_queue_init(&mVideoQ);
- packet_queue_init(&mAudioQ);
-
if (st_index[AVMEDIA_TYPE_AUDIO] >= 0) {
audio_ret = stream_component_open(st_index[AVMEDIA_TYPE_AUDIO]);
if (audio_ret >= 0)