@@ -45,7 +45,7 @@
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"
#include "libavutil/thread.h"
-#include "libavutil/threadmessage.h"
+//#include "libavutil/threadmessage.h"
#include "libswresample/swresample.h"
@@ -438,8 +438,8 @@ typedef struct InputFile {
/* when looping the input file, this queue is used by decoders to report
* the last frame duration back to the demuxer thread */
- AVThreadMessageQueue *audio_duration_queue;
- int audio_duration_queue_size;
+ //AVThreadMessageQueue *audio_duration_queue;
+ //int audio_duration_queue_size;
} InputFile;
enum forced_keyframes_const {
@@ -702,6 +702,7 @@ static void *decoder_thread(void *arg)
if (!flush_buffers)
break;
+#if 0
/* report last frame duration to the demuxer thread */
if (ist->dec->type == AVMEDIA_TYPE_AUDIO) {
LastFrameDuration dur;
@@ -713,6 +714,7 @@ static void *decoder_thread(void *arg)
av_thread_message_queue_send(ifile->audio_duration_queue, &dur, 0);
}
+#endif
avcodec_flush_buffers(ist->dec_ctx);
} else if (ret < 0) {
@@ -738,10 +740,12 @@ finish:
tq_receive_finish(d->queue_in, 0);
tq_send_finish (d->queue_out, 0);
+#if 0
// make sure the demuxer does not get stuck waiting for audio durations
// that will never arrive
if (ifile->audio_duration_queue && ist->dec->type == AVMEDIA_TYPE_AUDIO)
av_thread_message_queue_set_err_recv(ifile->audio_duration_queue, AVERROR_EOF);
+#endif
dec_thread_uninit(&dt);
@@ -150,6 +150,7 @@ static void report_new_stream(Demuxer *d, const AVPacket *pkt)
d->nb_streams_warn = pkt->stream_index + 1;
}
+#if 0
static void ifile_duration_update(Demuxer *d, DemuxStream *ds,
int64_t last_duration)
{
@@ -217,6 +218,7 @@ static int seek_to_start(Demuxer *d)
return ret;
}
+#endif
static void ts_discontinuity_detect(Demuxer *d, InputStream *ist,
AVPacket *pkt)
@@ -568,6 +570,7 @@ static void *input_thread(void *arg)
continue;
}
if (ret < 0) {
+#if 0
if (d->loop) {
/* signal looping to the consumer thread */
pkt->opaque = (void*)(intptr_t)PKT_OPAQUE_SEEK;
@@ -579,6 +582,7 @@ static void *input_thread(void *arg)
/* fallthrough to the error path */
}
+#endif
if (ret == AVERROR_EOF)
av_log(d, AV_LOG_VERBOSE, "EOF while reading input\n");
@@ -655,7 +659,7 @@ static void thread_stop(Demuxer *d)
tq_free(&d->thread_queue);
- av_thread_message_queue_free(&f->audio_duration_queue);
+ //av_thread_message_queue_free(&f->audio_duration_queue);
}
static int thread_start(Demuxer *d)
@@ -677,6 +681,7 @@ static int thread_start(Demuxer *d)
return AVERROR(ENOMEM);
}
+#if 0
if (d->loop) {
int nb_audio_dec = 0;
@@ -694,6 +699,7 @@ static int thread_start(Demuxer *d)
f->audio_duration_queue_size = nb_audio_dec;
}
}
+#endif
if ((ret = pthread_create(&d->thread, NULL, input_thread, d))) {
av_log(d, AV_LOG_ERROR, "pthread_create failed: %s. Try to increase `ulimit -v` or decrease `ulimit -s`.\n", strerror(ret));
@@ -154,10 +154,10 @@ fate-ffmpeg-fix_sub_duration: CMD = fmtstdout srt -fix_sub_duration \
# FIXME: the integer AAC decoder does not produce the same output on all platforms
# so until that is fixed we use the volume filter to silence the data
-FATE_SAMPLES_FFMPEG-$(call FRAMECRC, MATROSKA, H264 AAC_FIXED, PCM_S32LE_ENCODER VOLUME_FILTER) += fate-ffmpeg-streamloop-transcode-av
-fate-ffmpeg-streamloop-transcode-av: CMD = \
- framecrc -auto_conversion_filters -stream_loop 3 -c:a aac_fixed -i $(TARGET_SAMPLES)/mkv/1242-small.mkv \
- -af volume=0:precision=fixed -c:a pcm_s32le
+#FATE_SAMPLES_FFMPEG-$(call FRAMECRC, MATROSKA, H264 AAC_FIXED, PCM_S32LE_ENCODER VOLUME_FILTER) += fate-ffmpeg-streamloop-transcode-av
+#fate-ffmpeg-streamloop-transcode-av: CMD = \
+# framecrc -auto_conversion_filters -stream_loop 3 -c:a aac_fixed -i $(TARGET_SAMPLES)/mkv/1242-small.mkv \
+# -af volume=0:precision=fixed -c:a pcm_s32le
FATE_STREAMCOPY-$(call REMUX, MP4 MOV, EAC3_DEMUXER) += fate-copy-trac3074
fate-copy-trac3074: CMD = transcode eac3 $(TARGET_SAMPLES)/eac3/csi_miami_stereo_128_spx.eac3\
@@ -194,8 +194,8 @@ FATE_STREAMCOPY-$(call REMUX, PSP MOV, H264_PARSER H264_DECODER) += fate-copy-ps
fate-copy-psp: CMD = transcode "mov" $(TARGET_SAMPLES)/h264/wwwq_cut.mp4\
psp "-c copy" "-codec copy"
-FATE_STREAMCOPY-$(call FRAMEMD5, FLV, H264) += fate-ffmpeg-streamloop-copy
-fate-ffmpeg-streamloop-copy: CMD = framemd5 -stream_loop 2 -i $(TARGET_SAMPLES)/flv/streamloop.flv -c copy
+#FATE_STREAMCOPY-$(call FRAMEMD5, FLV, H264) += fate-ffmpeg-streamloop-copy
+#fate-ffmpeg-streamloop-copy: CMD = framemd5 -stream_loop 2 -i $(TARGET_SAMPLES)/flv/streamloop.flv -c copy
tests/data/audio_shorter_than_video.nut: TAG = GEN
tests/data/audio_shorter_than_video.nut: tests/data/vsynth_lena.yuv