mirror of
https://github.com/Motion-Project/motion.git
synced 2026-02-18 15:16:31 -05:00
Fix motion segfault for ffmpeg -r11071 and above http://www.lavrsen.dk/twiki/bin/view/Motion/SupportQuestion2007x12x29x175530
This commit is contained in:
@@ -33,6 +33,8 @@ Bugfixes
|
||||
* Fix http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2007x11x25x102808 (Angel Carpintero)
|
||||
* Avoid random errors , initialising some structs for V4L1
|
||||
http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2007x11x26x010755 (Jason Sharpee & Angel Carpintero)
|
||||
* Fix motion segfaul because ffmpeg API change
|
||||
http://www.lavrsen.dk/twiki/bin/view/Motion/SupportQuestion2007x12x29x175530 (Angel Carpintero)
|
||||
|
||||
3.2.9 Formal Release - Summary of Changes
|
||||
|
||||
|
||||
2
CREDITS
2
CREDITS
@@ -383,6 +383,8 @@ Angel Carpintero
|
||||
* Fix http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2007x11x25x102808
|
||||
* Avoid random errors , initialising some structs for V4L1
|
||||
http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2007x11x26x010755 (Jason Sharpee & Angel Carpintero)
|
||||
* Fix motion segfaul because ffmpeg API change
|
||||
http://www.lavrsen.dk/twiki/bin/view/Motion/SupportQuestion2007x12x29x175530 (Angel Carpintero)
|
||||
|
||||
Jared D
|
||||
* Change bayer2rgb24() to fix a problem with sn9c102 driver
|
||||
|
||||
11
ffmpeg.c
11
ffmpeg.c
@@ -36,6 +36,7 @@
|
||||
# endif /* __GNUC__ */
|
||||
#endif /* LIBAVCODEC_BUILD > 4680 */
|
||||
|
||||
|
||||
#if LIBAVFORMAT_BUILD >= 4616
|
||||
/* The API for av_write_frame changed with FFmpeg version 0.4.9pre1.
|
||||
* It now uses an AVPacket struct instead of direct parameters to the
|
||||
@@ -188,8 +189,14 @@ URLProtocol file_protocol = {
|
||||
*/
|
||||
static int mpeg1_write_trailer(AVFormatContext *s)
|
||||
{
|
||||
#if LIBAVFORMAT_BUILD >= 5200
|
||||
put_buffer(s->pb, mpeg1_trailer, 4);
|
||||
put_flush_packet(s->pb);
|
||||
#else
|
||||
put_buffer(&s->pb, mpeg1_trailer, 4);
|
||||
put_flush_packet(&s->pb);
|
||||
#endif /* LIBAVFORMAT_BUILD >= 5200 */
|
||||
|
||||
return 0; /* success */
|
||||
}
|
||||
|
||||
@@ -565,7 +572,11 @@ void ffmpeg_close(struct ffmpeg *ffmpeg)
|
||||
|
||||
if (!(ffmpeg->oc->oformat->flags & AVFMT_NOFILE)) {
|
||||
/* close the output file */
|
||||
#if LIBAVFORMAT_BUILD >= 5200
|
||||
url_fclose(ffmpeg->oc->pb);
|
||||
#else
|
||||
url_fclose(&ffmpeg->oc->pb);
|
||||
#endif /* LIBAVFORMAT_BUILD >= 5200 */
|
||||
}
|
||||
|
||||
/* free the stream */
|
||||
|
||||
Reference in New Issue
Block a user