[mythtv] [PATCH] MPEG2->MPEG2 commercial cut (myth patch)

Jim Paris jim at jtan.com
Sun Jan 4 16:01:27 EST 2004


> Support padding frames in video streams.  This is apparently a
> manifestation of a libavformat bug, but this is a reasonable fix until
> that has been sorted.

I'd recommend still having an else{} clause in there to at least bail
out if there are other libavformat bugs, rather than just spin
endlessly.

> I appreciate the bug reports I've gotten so far, and would appreciate
> more from any other brave souls.

I just tried the latest patch (18a), and get a segfault when trying to
transcode with a cutlist.  I've attached a backtrace and the relevant
entry from the recorded table.

-jim
-------------- next part --------------
Script started on Sun Jan  4 15:50:08 2004
papa:/tv$ gdb mythtranscode
GNU gdb 5.3.90_2003-08-24-cvs-debian
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...
(gdb) set args -c 1060 -s 2003-12-14T22:00:00 -p autodetect -d -l
(gdb) run
Starting program: /usr/local/bin/mythtranscode -c 1060 -s 2003-12-14T22:00:00 -p autodetect -d -l
[New Thread 16384 (LWP 19949)]
2004-01-04 15:50:34 Transcoding from /tv/1060_20031214220000_20031214223000.nuv to /tv/1060_20031214220000_20031214223000.nuv.tmp
Input #0, mpeg, from '/tv/1060_20031214220000_20031214223000.nuv':
  Stream #0.0: Video: mpeg2video, 720x480, 29.97 fps
  Stream #0.1: Audio: mp2, 48000 Hz, stereo, 384 kb/s
BUG: StackedConfigurationGroup::raise(): unrecognized child 0 on setting Stream: 0 Type: 0
Stream: 1 Type: 1
Input #0, mpeg, from '/tv/1060_20031214220000_20031214223000.nuv':
  Stream #0.0: Video: mpeg2video, 720x480, 29.97 fps
  Stream #0.1: Audio: mp2, 48000 Hz, stereo, 384 kb/s

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 19949)]
0x0805a550 in MPEG2trans::process_video(AVPacket*) (this=0x8122188, 
    pkt=0xbffff810) at mpeg2trans.cpp:513
513	            if(! chopping && cutlistIter != cutlistMap.end() && 
(gdb) thread apply all bt full

Thread 1 (Thread 16384 (LWP 19949)):
#0  0x0805a550 in MPEG2trans::process_video(AVPacket*) (this=0x8122188, 
    pkt=0xbffff810) at mpeg2trans.cpp:513
	frame_len = 86
	pos = 0
	skip_pic_frame = false
	found_gop = false
	vidblkptr = (uint8_t *) 0x81c1a68 ""
	frame_start = (uint8_t *) 0x0
	len = 44664
	thispkt = (AVPacket *) 0x812222c
#1  0x0805b362 in MPEG2trans::DoTranscode(QString, QString) (this=0x8122188, 
    inputFilename=
      {static null = {static null = <same as static member of an already seen type>, d = 0x8069fc0, static shared_null = 0x8069fc0}, d = 0x8082960, static shared_null = 0x8069fc0}, outputFilename=
      {static null = {static null = <same as static member of an already seen type>, d = 0x8069fc0, static shared_null = 0x8069fc0}, d = 0x8086d30, static shared_null = 0x8069fc0}) at mpeg2trans.cpp:740
	pkt1 = {pts = 400400, dts = 300300, data = 0x815d0f0 "", size = 44664, 
  stream_index = 0, flags = 1, duration = 33366, startpos = 38, 
  destruct = 0x4040fc4b <av_destruct_packet>, priv = 0x7183d2a4}
---Type <return> to continue, or q <return> to quit---
	pkt = (AVPacket *) 0xbffff810
	params = {frame_rate = 135372616, frame_rate_base = 134777793, 
  sample_rate = 17, channels = 1090702580, width = 1093147904, 
  height = 135405960, pix_fmt = 16775176, image_format = 0x8143e30, 
  channel = 1093147920, device = 0x1c0 <Address 0x1c0 out of bounds>, 
  standard = 0x281d00 <Address 0x281d00 out of bounds>, mpeg2ts_raw = 0, 
  mpeg2ts_compute_pcr = 0, initial_pause = 0}
	ap = (AVFormatParameters *) 0x8143e80
	i = 2
	err = 0
#2  0x0804fd02 in main (argc=9, argv=0xbffffb24) at main.cpp:269
	mpeg2trans = (MPEG2trans *) 0x8122188
	chanid = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x8069fc0, static shared_null = 0x8069fc0}, d = 0x8071798, 
  static shared_null = 0x8069fc0}
	starttime = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x8069fc0, static shared_null = 0x8069fc0}, d = 0x8079590, 
  static shared_null = 0x8069fc0}
	infile = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x8069fc0, static shared_null = 0x8069fc0}, d = 0x8082960, 
---Type <return> to continue, or q <return> to quit---
  static shared_null = 0x8069fc0}
	profilename = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x8069fc0, static shared_null = 0x8069fc0}, d = 0x806d410, 
  static shared_null = 0x8069fc0}
	fifodir = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x8069fc0, static shared_null = 0x8069fc0}, d = 0x806d428, 
  static shared_null = 0x8069fc0}
	useCutlist = true
	keyframesonly = false
	use_db = true
	fifosync = false
	deleteMap = {sh = 0x806d440}
	a = <incomplete type>
	found_starttime = 1
	found_chanid = 1
	found_infile = 0
	pginfo = (ProgramInfo *) 0x8082618
	tmpfile = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x8069fc0, static shared_null = 0x8069fc0}, d = 0x8086d30, 
  static shared_null = 0x8069fc0}
---Type <return> to continue, or q <return> to quit---
	transcode = (class Transcode *) 0x8082a58
	result = 2
	retval = 1090682702
(gdb) quit
The program is running.  Exit anyway? (y or n) y
papa:/tv$ exit

Script done on Sun Jan  4 15:50:48 2004
-------------- next part --------------
+--------+----------------+----------------+-----------+-----------------------------------------------------------------------------------------------+-------------+----------+----------+----------+---------+--------------------------------------------+------------+-------------+
| chanid | starttime      | endtime        | title     | subtitle                                                                                      | description | category | hostname | bookmark | editing | cutlist                                    | autoexpire | commflagged |
+--------+----------------+----------------+-----------+-----------------------------------------------------------------------------------------------+-------------+----------+----------+----------+---------+--------------------------------------------+------------+-------------+
|   1060 | 20031214220000 | 20031214223000 | Mail Call | Claymore Mine; 1st U.S. Nuclear Sub; Resupply at Sea; Patriot Air Defense Missile; Jody Songs |             | War      | papa     | NULL     |       0 | 13133 - 19784
31231 - 36643
50437 - 53143
 |          1 |           1 |
+--------+----------------+----------------+-----------+-----------------------------------------------------------------------------------------------+-------------+----------+----------+----------+---------+--------------------------------------------+------------+-------------+


More information about the mythtv-dev mailing list