Remove code that cannot be executed.
From: Erik Hovland <erik@hovland.org>
---
libs/libmythtv/avformatdecoder.cpp | 8 +++-----
libs/libmythtv/channel.cpp | 8 +++-----
libs/libmythtv/decoderbase.cpp | 2 +-
libs/libmythtv/dsmcc.cpp | 2 +-
libs/libmythtv/mhi.cpp | 7 ++-----
libs/libmythtv/vbitext/vbi.c | 22 ++--------------------
libs/libmythtv/videodev_myth.h | 4 +++-
libs/libmythtv/yuv2rgb.cpp | 4 ++--
8 files changed, 17 insertions(+), 40 deletions(-)
diff --git a/libs/libmythtv/avformatdecoder.cpp b/libs/libmythtv/avformatdecoder.cpp
index e7b4735..860cb8a 100644
a
|
b
|
bool AvFormatDecoder::GetFrame(int onlyvideo)
|
3120 | 3120 | { |
3121 | 3121 | ateof = true; |
3122 | 3122 | GetNVP()->SetEof(); |
3123 | | if (pkt) |
3124 | | delete pkt; |
| 3123 | delete pkt; |
3125 | 3124 | return false; |
3126 | 3125 | } |
3127 | 3126 | |
… |
… |
bool AvFormatDecoder::GetFrame(int onlyvideo)
|
3278 | 3277 | if (GetNVP()->IsErrored()) |
3279 | 3278 | { |
3280 | 3279 | av_free_packet(pkt); |
3281 | | if (pkt) |
3282 | | delete pkt; |
| 3280 | delete pkt; |
3283 | 3281 | return false; |
3284 | 3282 | } |
3285 | 3283 | } |
… |
… |
bool AvFormatDecoder::SetupAudioStream(void)
|
4047 | 4045 | audioIn.do_passthru); |
4048 | 4046 | |
4049 | 4047 | // allow the audio stuff to reencode |
4050 | | GetNVP()->SetAudioCodec(using_passthru?codec_ctx:NULL); |
| 4048 | GetNVP()->SetAudioCodec(NULL); |
4051 | 4049 | GetNVP()->ReinitAudio(); |
4052 | 4050 | |
4053 | 4051 | return true; |
diff --git a/libs/libmythtv/channel.cpp b/libs/libmythtv/channel.cpp
index 3bae71d..13725b5 100644
a
|
b
|
static QString mode_to_format(int mode, int v4l_version)
|
249 | 249 | return "PAL"; |
250 | 250 | else if (mode == VIDEO_MODE_SECAM) |
251 | 251 | return "SECAM"; |
252 | | else if (mode == 3) |
| 252 | else if (mode == VIDEO_MODE_PALNC) |
253 | 253 | return "PAL-NC"; |
254 | | else if (mode == 4) |
255 | | return "PAL-M"; |
256 | | else if (mode == 5) |
| 254 | else if (mode == VIDEO_MODE_PALN) |
257 | 255 | return "PAL-N"; |
258 | | else if (mode == 6) |
| 256 | else if (mode == VIDEO_MODE_NTSCJP) |
259 | 257 | return "NTSC-JP"; |
260 | 258 | } |
261 | 259 | else |
diff --git a/libs/libmythtv/decoderbase.cpp b/libs/libmythtv/decoderbase.cpp
index 9b3c78f..c067013 100644
a
|
b
|
int DecoderBase::AutoSelectTrack(uint type)
|
934 | 934 | } |
935 | 935 | |
936 | 936 | int oldTrack = currentTrack[type]; |
937 | | currentTrack[type] = (selTrack < 0) ? -1 : selTrack; |
| 937 | currentTrack[type] = selTrack; |
938 | 938 | StreamInfo tmp = tracks[type][currentTrack[type]]; |
939 | 939 | selectedTrack[type] = tmp; |
940 | 940 | |
diff --git a/libs/libmythtv/dsmcc.cpp b/libs/libmythtv/dsmcc.cpp
index 4386f31..fdad68c 100644
a
|
b
|
void Dsmcc::ProcessSection(const unsigned char *data, int length,
|
414 | 414 | // We haven't seen this stream before but it has the correct |
415 | 415 | // data_broadcast_id. Create a carousel for it. |
416 | 416 | // This will only happen at start-up |
417 | | car = AddTap(componentTag, carouselId); |
| 417 | AddTap(componentTag, carouselId); |
418 | 418 | m_startTag = componentTag; |
419 | 419 | found = true; |
420 | 420 | } |
diff --git a/libs/libmythtv/mhi.cpp b/libs/libmythtv/mhi.cpp
index dbd1657..c1c6da6 100644
a
|
b
|
void MHIContext::SetNetBootInfo(const unsigned char *data, uint length)
|
264 | 264 | QMutexLocker locker(&m_dsmccLock); |
265 | 265 | // Save the data from the descriptor. |
266 | 266 | m_nbiData.duplicate(data, length); |
267 | | // If there is no Network Boot Info or we're setting it |
268 | | // for the first time just update the "last version". |
269 | | if (length < 2) |
270 | | m_lastNbiVersion = NBI_VERSION_ABSENT; |
271 | | else if (m_lastNbiVersion == NBI_VERSION_UNSET) |
| 267 | // If we're setting it for the first time just update the "last version". |
| 268 | if (m_lastNbiVersion == NBI_VERSION_UNSET) |
272 | 269 | m_lastNbiVersion = data[0]; |
273 | 270 | else |
274 | 271 | m_engine_wait.wakeAll(); |
diff --git a/libs/libmythtv/vbitext/vbi.c b/libs/libmythtv/vbitext/vbi.c
index f7e31f4..0c67b5f 100644
a
|
b
|
vbi_send(struct vbi *vbi, int type, int i1, int i2, int i3, void *p1)
|
114 | 114 | static void |
115 | 115 | vbi_send_page(struct vbi *vbi, struct raw_page *rvtp, int page) |
116 | 116 | { |
117 | | struct vt_page *cvtp = 0; |
118 | | |
119 | 117 | if (rvtp->page->flags & PG_ACTIVE) |
120 | 118 | { |
121 | 119 | if (rvtp->page->pgno % 256 != page) |
122 | 120 | { |
123 | 121 | rvtp->page->flags &= ~PG_ACTIVE; |
124 | 122 | enhance(rvtp->enh, rvtp->page); |
125 | | // if (vbi->cache) |
126 | | // cvtp = vbi->cache->op->put(vbi->cache, rvtp->page); |
127 | | vbi_send(vbi, EV_PAGE, 0, 0, 0, cvtp ?: rvtp->page); |
| 123 | vbi_send(vbi, EV_PAGE, 0, 0, 0, rvtp->page); |
128 | 124 | } |
129 | 125 | } |
130 | 126 | } |
… |
… |
vbi_close(struct vbi *vbi)
|
693 | 689 | struct vt_page * |
694 | 690 | vbi_query_page(struct vbi *vbi, int pgno, int subno) |
695 | 691 | { |
696 | | struct vt_page *vtp = 0; |
697 | | |
698 | | (void)pgno; |
699 | | (void)subno; |
700 | | |
701 | | // if (vbi->cache) |
702 | | // vtp = vbi->cache->op->get(vbi->cache, pgno, subno); |
703 | | if (vtp == 0) |
704 | | { |
705 | | // EV_PAGE will come later... |
706 | | return 0; |
707 | | } |
708 | | |
709 | | vbi_send(vbi, EV_PAGE, 1, 0, 0, vtp); |
710 | | return vtp; |
| 692 | return 0; |
711 | 693 | } |
712 | 694 | |
713 | 695 | void |
diff --git a/libs/libmythtv/videodev_myth.h b/libs/libmythtv/videodev_myth.h
index 95ede70..438bde0 100644
a
|
b
|
struct video_tuner
|
64 | 64 | #define VIDEO_MODE_PAL 0 |
65 | 65 | #define VIDEO_MODE_NTSC 1 |
66 | 66 | #define VIDEO_MODE_SECAM 2 |
67 | | #define VIDEO_MODE_AUTO 3 |
| 67 | #define VIDEO_MODE_PALNC 3 |
68 | 68 | #define VIDEO_MODE_ATSC 4 /* dtv */ |
| 69 | #define VIDEO_MODE_PALN 5 |
| 70 | #define VIDEO_MODE_NTSCJP 6 |
69 | 71 | __u16 signal; /* Signal strength 16bit scale */ |
70 | 72 | }; |
71 | 73 | |
diff --git a/libs/libmythtv/yuv2rgb.cpp b/libs/libmythtv/yuv2rgb.cpp
index 94eda86..9674eb5 100644
a
|
b
|
yuv2rgb_fun yuv2rgb_init_mmx (int bpp, int mode)
|
376 | 376 | return mmx_rgb16; |
377 | 377 | else if ((bpp == 32) && (mode == MODE_RGB)) |
378 | 378 | return mmx_argb32; |
379 | | #endif |
380 | | |
| 379 | #else |
381 | 380 | if ((bpp == 32) && (mode == MODE_RGB)) |
382 | 381 | return yuv420_argb32_non_mmx; |
| 382 | #endif |
383 | 383 | |
384 | 384 | return NULL; |
385 | 385 | } |