Skip to content

Commit a40a0d7

Browse files
committed
Disable attached_pic
This feature causes crashes during file streaming on Windows. UnitTest has also been removed.
1 parent c57c3ee commit a40a0d7

File tree

2 files changed

+7
-42
lines changed

2 files changed

+7
-42
lines changed

Library/TeamTalkLib/avstream/FFmpegStreamer.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@ bool OpenInput(const ACE_TString& filename,
154154
/* select the video stream */
155155
video_stream_index = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_VIDEO,
156156
-1, -1, &vid_dec, 0);
157+
if (video_stream_index >= 0) {
158+
const AVStream* vidstream = fmt_ctx->streams[video_stream_index];
159+
if (vidstream->disposition & AV_DISPOSITION_ATTACHED_PIC)
160+
{
161+
video_stream_index = -1;
162+
}
163+
}
157164
if (video_stream_index >= 0) {
158165
const AVStream* vidstream = fmt_ctx->streams[video_stream_index];
159166
const AVCodecParameters* vidparms = vidstream->codecpar;

Library/TeamTalkLib/test/CatchDefault.cpp

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,48 +1782,6 @@ TEST_CASE("TT_AEC")
17821782
}
17831783
#endif
17841784

1785-
#if defined(ENABLE_FFMPEG)
1786-
TEST_CASE("testThumbnail")
1787-
{
1788-
// ffmpeg -i in.mp3 -i teamtalk.png -map 0:0 -map 1:0 -c copy -id3v2_version 3 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" out.mp3
1789-
1790-
TTCHAR filename[TT_STRLEN] = ACE_TEXT("testdata/mp3/thumbnail.mp3");
1791-
1792-
MediaFileProp mfp;
1793-
REQUIRE(GetMediaFileProp(filename, mfp));
1794-
REQUIRE(mfp.video.IsValid());
1795-
1796-
MediaStreamOutput const prop(media::AudioFormat(16000, 2), 1600, media::FOURCC_NONE);
1797-
FFmpegStreamer ffmpeg(filename, prop);
1798-
1799-
REQUIRE(ffmpeg.Open());
1800-
1801-
std::promise<bool> done;
1802-
auto sig_done = done.get_future();
1803-
1804-
auto status = [&] (const MediaFileProp& /*mfp*/, MediaStreamStatus status) {
1805-
if (status == MEDIASTREAM_FINISHED)
1806-
done.set_value(true);
1807-
};
1808-
1809-
auto audio = [] (media::AudioFrame& /*audio_frame*/, ACE_Message_Block* /*mb_audio*/) {
1810-
return false;
1811-
};
1812-
1813-
auto video = [] (media::VideoFrame& /*video_frame*/, ACE_Message_Block* /*mb_video*/) {
1814-
return false;
1815-
};
1816-
1817-
ffmpeg.RegisterStatusCallback(status, true);
1818-
ffmpeg.RegisterAudioCallback(audio, true);
1819-
ffmpeg.RegisterVideoCallback(video, true);
1820-
1821-
REQUIRE(ffmpeg.StartStream());
1822-
1823-
REQUIRE(sig_done.get());
1824-
}
1825-
#endif
1826-
18271785
#if defined(ENABLE_ENCRYPTION)
18281786

18291787
TEST_CASE("testSSLNonBlockConnector")

0 commit comments

Comments
 (0)