write_video_ts and write_video_pes both can return negative values if things don't
From: Erik Hovland <erik@hovland.org>
work out.
---
programs/mythtranscode/replex/multiplex.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/programs/mythtranscode/replex/multiplex.c b/programs/mythtranscode/replex/multiplex.c
index 75a99cd..c341e7f 100644
a
|
b
|
static void writeout_video(multiplex_t *mx) |
272 | 272 | mx->SCR, mx->muxr, outbuf, &nlength, |
273 | 273 | ptsdts, mx->vrbuffer); |
274 | 274 | |
| 275 | // something bad happened with the PES or TS write, bail |
| 276 | if (written == -1) |
| 277 | return; |
| 278 | |
275 | 279 | length -= nlength; |
276 | 280 | dummy_add(&mx->vdbuf, uptsdiff( viu->dts+mx->video_delay,0) |
277 | 281 | , viu->length-length); |
… |
… |
static void writeout_ext(multiplex_t *mx, int n) |
420 | 424 | break; |
421 | 425 | } |
422 | 426 | |
| 427 | // something bad happened when writing TS or PES to the MPEG or AC3 |
| 428 | // audio stream |
| 429 | if (written == -1) |
| 430 | return; |
| 431 | |
423 | 432 | length -= nlength; |
424 | 433 | write(mx->fd_out, outbuf, written); |
425 | 434 | |