Bug 183269 - mediatomb crashes on video file scan.
mediatomb crashes on video file scan.
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: William Grzybowski
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-24 11:40 UTC by andriys
Modified: 2013-10-25 19:50 UTC (History)
0 users

See Also:


Attachments
file.diff (602 bytes, patch)
2013-10-24 11:40 UTC, andriys
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description andriys 2013-10-24 11:40:00 UTC
After the recent update of multimedia/ffmpeg to v.2.0.1 mediatomb started crashing on any video file scan attempt.

Stack back trace shows avformat_open_input() on top. My investigation showed that avformat_open_input() expects either the AVFormatContext being pre-initialized or a pointer to it being set to NULL. Neither is currently the case in mediatomb.

Fix: The following patch fixed the problem for me:

Index: net/mediatomb/files/patch-livav9
===================================================================
--- net/mediatomb/files/patch-livav9	(revision 331419)
+++ net/mediatomb/files/patch-livav9	(working copy)
@@ -12,6 +12,15 @@
  		if (tag && tag->value && tag->value[0])
  		{
  			log_debug("Added metadata %s: %s\n", m->avname, tag->value);
+@@ -281,7 +281,7 @@
+     int x = 0;
+     int y = 0;
+
+-	AVFormatContext *pFormatCtx;
++	AVFormatContext *pFormatCtx = 0;
+ 	
+ 	// Suppress all log messages
+ 	av_log_set_callback(FfmpegNoOutputStub);
 @@ -290,14 +290,14 @@
      av_register_all();
  


Patch attached with submission follows:
How-To-Repeat: Start mediatomb and add some directory containing video files to scan.
Comment 1 dfilter freebsd_committer 2013-10-25 19:40:18 UTC
Author: wg
Date: Fri Oct 25 18:40:10 2013
New Revision: 331624
URL: http://svnweb.freebsd.org/changeset/ports/331624

Log:
  net/mediatomb: fix patch for ffmpeg2 support
  
  - Fix patch for ffmpeg2 support
  
  PR:		ports/183269
  Submitted by:	Andriy Syrovenko <andriys gmail.com>

Modified:
  head/net/mediatomb/files/patch-livav9

Modified: head/net/mediatomb/files/patch-livav9
==============================================================================
--- head/net/mediatomb/files/patch-livav9	Fri Oct 25 18:38:03 2013	(r331623)
+++ head/net/mediatomb/files/patch-livav9	Fri Oct 25 18:40:10 2013	(r331624)
@@ -12,6 +12,15 @@ diff -burN mediatomb-0.12.1.old//src/met
  		if (tag && tag->value && tag->value[0])
  		{
  			log_debug("Added metadata %s: %s\n", m->avname, tag->value);
+@@ -281,7 +281,7 @@
+     int x = 0;
+     int y = 0;
+
+-	AVFormatContext *pFormatCtx;
++	AVFormatContext *pFormatCtx = 0;
+ 	
+ 	// Suppress all log messages
+ 	av_log_set_callback(FfmpegNoOutputStub);
 @@ -290,14 +290,14 @@
      av_register_all();
  
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 2 William Grzybowski freebsd_committer 2013-10-25 19:40:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wg

I'll take it.
Comment 3 William Grzybowski freebsd_committer 2013-10-25 19:40:29 UTC
State Changed
From-To: open->closed

Committed. Thanks!