Permalink
Browse files

Added pthread linkage for newer versions of avformat.

Added av_guess_format for newer versions of avformat.
  • Loading branch information...
1 parent 402925c commit 8595f70c6c819b8522ae99ea471d522fc98be5e7 @carsonmcdonald committed Mar 31, 2010
Showing with 5 additions and 1 deletion.
  1. +1 −1 Makefile
  2. +4 −0 live_segmenter.c
View
@@ -1,5 +1,5 @@
all:
- gcc -Wall -g live_segmenter.c -o live_segmenter -lavformat -lavcodec -lavutil -lbz2 -lm -lz -lfaac -lmp3lame -lx264 -lfaad
+ gcc -Wall -g live_segmenter.c -o live_segmenter -lavformat -lavcodec -lavutil -lbz2 -lm -lz -lfaac -lmp3lame -lx264 -lfaad -lpthread
clean:
rm -f live_segmenter
View
@@ -159,7 +159,11 @@ int main(int argc, char **argv)
exit(1);
}
+#if LIBAVFORMAT_VERSION_MAJOR >= 52 && LIBAVFORMAT_VERSION_MINOR >= 45
+ AVOutputFormat *output_format = av_guess_format("mpegts", NULL, NULL);
+#else
AVOutputFormat *output_format = guess_format("mpegts", NULL, NULL);
+#endif
if (!output_format)
{
fprintf(stderr, "Segmenter error: Could not find MPEG-TS muxer\n");

0 comments on commit 8595f70

Please sign in to comment.