[mythtv-commits] Ticket #12602: lossless transcode that fills the disk loses the tail of the recording
MythTV
noreply at mythtv.org
Wed Jan 13 19:15:06 UTC 2016
#12602: lossless transcode that fills the disk loses the tail of the recording
------------------------------------------+---------------------------
Reporter: Timothy D Witham <twitham@…> | Owner: jyavenard
Type: Bug Report - General | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - Mythtranscode | Version: 0.27.5
Severity: medium | Resolution:
Keywords: disk full transcode truncate | Ticket locked: 0
------------------------------------------+---------------------------
Comment (by Timothy D Witham <twitham@…>):
Looks like mythtv code is at a higher abstraction layer that is not
actually doing the open/write/close calls at all. transcode.cpp calls
avfw->CloseFile(); which in avformatwriter.cpp does an avio_close without
checking its return value:
https://code.mythtv.org/doxygen/avformatwriter_8cpp_source.html#l00211
avio_close is over in ffmpeg's libav*:
https://ffmpeg.org/doxygen/trunk/aviobuf_8c_source.html#l00943
This calls an avio_flush which hopefully blocks until the data is written,
then avio_close returns ffurl_close which returns h->prot->url_close:
https://ffmpeg.org/doxygen/trunk/avio_8c_source.html#l00390
I still haven't tracked down the actual close() in libav, but so far all
calls are passing the return value back up the chain, until the return of
avio_close is ignored in mythtv's avformatwriter.cpp.
So my bug fix idea should still work only if libav detects the ENOSPC
error and passes it back up to avio_close where it can be detected and
handled better by mythtv code (log the error and remove truncated new file
instead of rename over original).
--
Ticket URL: <https://code.mythtv.org/trac/ticket/12602#comment:4>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list