mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
driver: use newer ffmpeg API
Reduce the "deprecated function" warnings a bit when compiling against recent ffmpeg releases. Just the drop-in-replacement "av_packet_unref" which works with both old and new ffmpeg versions. The other stuff needs rewrites which are not compatible with all ffmpeg releases :-(
This commit is contained in:
committed by
svenhoefer
parent
0531618643
commit
7154f36258
@@ -900,7 +900,7 @@ void CStreamStream::run()
|
||||
AVPacket newpkt = pkt;
|
||||
|
||||
if (av_bitstream_filter_filter(bsfc, codec, NULL, &newpkt.data, &newpkt.size, pkt.data, pkt.size, pkt.flags & AV_PKT_FLAG_KEY) >= 0) {
|
||||
av_free_packet(&pkt);
|
||||
av_packet_unref(&pkt);
|
||||
newpkt.buf = av_buffer_create(newpkt.data, newpkt.size, av_buffer_default_free, NULL, 0);
|
||||
pkt = newpkt;
|
||||
}
|
||||
@@ -909,7 +909,7 @@ void CStreamStream::run()
|
||||
pkt.dts = av_rescale_q(pkt.dts, ifcx->streams[pkt.stream_index]->time_base, ofcx->streams[pkt.stream_index]->time_base);
|
||||
|
||||
av_write_frame(ofcx, &pkt);
|
||||
av_free_packet(&pkt);
|
||||
av_packet_unref(&pkt);
|
||||
}
|
||||
|
||||
av_read_pause(ifcx);
|
||||
|
Reference in New Issue
Block a user