Hi, I am trying to compile on ubuntu 18.04 and I am getting the following error. Any thoughts or suggestions?
g++ -Wall -O3 -Wextra -I/usr/local/opt/opencv3/include -g -MMD -c media.cpp -o build/media.o
In file included from publisher.h:6:0,
from media.h:8,
from media.cpp:1:
publisher.h: In function ‘void log_packet(const AVFormatContext*, const AVPacket*)’:
publisher.h:74:12: error: taking address of temporary array
av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, time_base),
^
publisher.h:74:33: error: taking address of temporary array
av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, time_base),
^
publisher.h:75:12: error: taking address of temporary array
av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, time_base),
^
publisher.h:75:33: error: taking address of temporary array
av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, time_base),
^
publisher.h:76:12: error: taking address of temporary array
av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, time_base),
^
publisher.h:76:38: error: taking address of temporary array
av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, time_base),
^
Makefile:27: recipe for target 'build/media.o' failed
make: *** [build/media.o] Error 1
Hi, I am trying to compile on ubuntu 18.04 and I am getting the following error. Any thoughts or suggestions?
g++ -Wall -O3 -Wextra -I/usr/local/opt/opencv3/include -g -MMD -c media.cpp -o build/media.o
In file included from publisher.h:6:0,
from media.h:8,
from media.cpp:1:
publisher.h: In function ‘void log_packet(const AVFormatContext*, const AVPacket*)’:
publisher.h:74:12: error: taking address of temporary array
av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, time_base),
^
publisher.h:74:33: error: taking address of temporary array
av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, time_base),
^
publisher.h:75:12: error: taking address of temporary array
av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, time_base),
^
publisher.h:75:33: error: taking address of temporary array
av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, time_base),
^
publisher.h:76:12: error: taking address of temporary array
av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, time_base),
^
publisher.h:76:38: error: taking address of temporary array
av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, time_base),
^
Makefile:27: recipe for target 'build/media.o' failed
make: *** [build/media.o] Error 1