Opened 14 years ago

Closed 12 years ago

#8523 closed defect (Works for me)

Use of PIC in lzo on x86_32 breaks .nuv playback (NuppelVideo)

Reported by: Joern Koerner <joern.koerner@…> Owned by: cpinkham
Priority: minor Milestone: unknown
Component: MythTV - General Version: 0.23-fixes
Severity: medium Keywords: play nuv
Cc: Ticket locked: no

Description

I'm currently unable to play .nuv videos. Either transcoded recordings are playable nor imported videos.

I have recorded a DVB-T Stream, let mythtv convert it to .nuv. When trying to play it I get:

2010-06-02 08:47:54.284 ProgramInfo?(): Updated pathname : -> '1128_20100522070800.nuv' 2010-06-02 08:47:54.323 NuppelDecoder?: lzo_init() failed, aborting 2010-06-02 08:47:54.323 NVP(0), Error: Could not initialize A/V decoder. 2010-06-02 08:47:54.324 NVP(0), Error: Could not open file for preview. 2010-06-02 08:47:54.327 Preview Error: Run() file not local: '/mythtvstorage/1128_20100522070800.nuv' 2010-06-02 08:47:54.327 ~MythContext waiting for threads to exit. 2010-06-02 08:47:54.351 Preview Error: Encountered problems running '/usr/bin/mythbackend --generate-preview 0x0 --chanid 1128 --starttime 20100522070800 ' 2010-06-02 08:47:56.607 TV: Attempting to change from None to WatchingPreRecorded? 2010-06-02 08:47:56.684 NuppelDecoder?: lzo_init() failed, aborting 2010-06-02 08:47:56.684 NVP(0), Error: Could not initialize A/V decoder.

Then I downloaded a sample nuv file from http://samples.mplayerhq.hu/nuv/nirvana.nuv and tried to play:

2010-06-02 08:38:22.612 TV: Attempting to change from None to WatchingVideo? 2010-06-02 08:38:22.699 NuppelDecoder?: lzo_init() failed, aborting 2010-06-02 08:38:22.700 NVP(0), Error: Could not initialize A/V decoder.

mplayer itself is able to play these files without problems.

I've compiled a clean mythtv setup from the 0.23 tarballs As far as I can see

This error (lzo_init() failed) is generated in nuppeldecoder.cpp and comes from minilzo.cpp which are part of libmyth. So it seems that the library itself is broken. Can anyone actually play a nuv file ?

Attachments (1)

Makefile (207.0 KB) - added by Joern Koerner <joern.koerner@…> 14 years ago.
Makefile for libmythtv that is able to play nuv files

Download all attachments as: .zip

Change History (8)

comment:1 Changed 14 years ago by Joern Koerner <joern.koerner@…>

Let the things clear up a little bit: The error itself ("NuppelDecoder?: lzo_init() failed, aborting") is generated in libmythtv->nuppeldecoder.cpp at ~line 86. At this point the linked library "minilzo.cpp" is called. So the initialisation of the lzo lib failed.

So far I found some interesting comment when I look at the minilzo sources (testmini.c) -- SNIP --------------------------

if (lzo_init() != LZO_E_OK) {

printf("internal error - lzo_init() failed !!!\n"); printf("(this usually indicates a compiler bug - try recompiling\nwithout optimizations, and enable `-DLZO_DEBUG' for diagnostics)\n"); return 3;

}

-- SNAP --------------------------

Also the README of the mimilzo lib tells: ...

If you are running on a very unusual architecture and lzo_init() fails then you should first recompile with `-DLZO_DEBUG' to see what causes the failure. The most probable case is something like `sizeof(char *) != sizeof(long)'. After identifying the problem you can compile by adding some defines like `-DSIZEOF_CHAR_P=8' to your Makefile.

The best solution is (of course) using Autoconf - if your project uses Autoconf anyway just add `-DMINILZO_HAVE_CONFIG_H' to your compiler flags when compiling minilzo.c. See the LZO distribution for an example how to set up configure.in.

My configure parameters and it's output are: ./configure --prefix=/usr --enable-audio-oss --enable-audio-alsa --disable-audio-jack --disable-audio-pulse --disable-distcc --disable-ccache --enable-vdpau --enable-dvb --dvb-path=/usr/include --enable-x11 --with-bindings=perl,python # Basic Settings Compile type release Compiler cache no DistCC no qmake /usr/bin/qmake install prefix /usr runtime prefix /usr CPU x86 x86_32 (Intel(R) Pentium(R) 4 CPU 3.00GHz) big-endian no runtime cpu detection no yasm yes MMX enabled yes MMX2 enabled yes 3DNow! enabled yes 3DNow! extended enabled yes SSE enabled yes SSSE3 enabled yes CMOV enabled yes

# Input Support Joystick menu yes lirc support yes Video4Linux sup. yes ivtv support yes HD-PVR support yes FireWire? support yes DVB support yes usr/include DVB-S2 support yes HDHomeRun support yes IPTV support yes

# Sound Output Support PulseAudio? support no OSS support yes ALSA support yes JACK support no libfftw3 support no

# Video Output Support x11 support yes xrandr support yes xv support yes XvMC support yes XvMC VLD support yes XvMC pro support no XvMC libs -lXvMCW VDPAU support yes OpenGL video yes OpenGL vsync yes DirectFB no Fribidi formatting yes MHEG support yes

# Misc Features multi threaded libavcodec yes Frontend yes Backend yes

# Bindings bindings_perl yes bindings_python yes

Creating libs/libmythdb/mythconfig.h and libs/libmythdb/mythconfig.mak

libs/libavutil/avconfig.h is unchanged

This is the same (well and correct) way mythtv tries to initialize the lzo library. I will try get more info.

comment:2 Changed 14 years ago by Joern Koerner <joern.koerner@…>

It seems to be the CXXFLAGS "-DPIC -fPIC -fomit-frame-pointer" that causes this problem.

When I (manually) compile libmythtv and remove the flags for minilzo.cpp it works.

This are the flags which works fine: DEFINES="-DMMX -Di386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DLZO_DEBUG" CXXFLAGS="-pipe -O2 -march=i686 -g -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -funit-at-a-time -DSTDC_CONSTANT_MACROS -I/usr/include/freetype2 -D_REENTRANT "

I attached a the libmythtv Makefile that works.

Changed 14 years ago by Joern Koerner <joern.koerner@…>

Attachment: Makefile added

Makefile for libmythtv that is able to play nuv files

comment:3 Changed 14 years ago by sphery

Priority: criticalminor
Summary: Unable to play .nuv files (NuppelVideo)Use of PIC in lzo on x86_32 breaks .nuv playback (NuppelVideo)

comment:4 Changed 14 years ago by Janne Grunau

Owner: changed from Isaac Richards to Janne Grunau
Status: newaccepted

comment:5 Changed 14 years ago by robertm

Milestone: 0.23-fixesunknown

comment:6 Changed 12 years ago by cpinkham

Owner: changed from Janne Grunau to cpinkham
Status: acceptedassigned

comment:7 Changed 12 years ago by cpinkham

Resolution: Works for me
Status: assignedclosed

Closing this as works for me. I've tested current git master on 32-bit with -fPIC on CentOS 5.x and am unable to reproduce the issue.

Note: See TracTickets for help on using tickets.