[mythtv] Call for testing branch devel/ffmpeg-resync (mpegts-harmonize)

John Pilkington johnpilk222 at gmail.com
Tue Jul 26 22:41:42 UTC 2022


On 26/07/2022 20:09, Scott Theisen wrote:
> On 7/26/22 14:10, Scott Theisen wrote:
>> Initial impression: probable double free 
> 
> I would like mythcommflag logs with `-v libav:debug` from both master 
> and ffmpeg-resync.
> 
> It appears that since add_section_stream() reuses the SectionContext if 
> it already exists, this leads to two DSMCC streams with the same value 
> of the pointer priv_data which then is double freed since it is freed 
> with each stream.
> 
> This should fix the double free, but I need you to test if the 
> DSMCC/MHEG streams still work correctly since I can't:
> ```
> diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c 
> b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
> index 4a74c5c3ac..90229cf6ae 100644
> --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
> +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
> @@ -2494,12 +2494,17 @@ static SectionContext 
> *add_section_stream(MpegTSContext *ts, int pid, int stream
>       MpegTSFilter *tss = ts->pids[pid];
>       SectionContext *sect = 0;
>       if (tss) { /* filter already exists */
> +#if 0
> +/*
> +returning the preexisting SectionContext causes it to be double freed 
> when its
> +owning AVStream is freed.  (It gets freed via AVStream.priv_data.)
> +*/
>           if (tss->type == MPEGTS_SECTION)
>               sect = (SectionContext*) tss->u.section_filter.opaque;
> 
>           if (sect && (sect->stream_type == stream_type))
>               return sect; /* if it's the same stream type, just return 
> ok */
> -
> +#endif
>           /* otherwise, kill it, and start a new stream */
>           mpegts_close_filter(ts, tss);
>       }
> 
> ```
> 
> Regards,
> 
> Scott

Attachment is from the unpatched build of ffmpeg-resync.  Will try the 
rest tomorrow.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythcommflag.20220726223205.17587.tar.gz
Type: application/gzip
Size: 29921 bytes
Desc: not available
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20220726/bbc2b205/attachment-0001.gz>


More information about the mythtv-dev mailing list