mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +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:
@@ -310,7 +310,7 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state,
|
||||
}
|
||||
|
||||
if (rpacket.stream_index != best_stream) {
|
||||
av_free_packet(&rpacket);
|
||||
av_packet_unref(&rpacket);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state,
|
||||
}
|
||||
if (time_played && avc->streams[best_stream]->time_base.den)
|
||||
*time_played = (pts - start_pts) * avc->streams[best_stream]->time_base.num / avc->streams[best_stream]->time_base.den;
|
||||
av_free_packet(&rpacket);
|
||||
av_packet_unref(&rpacket);
|
||||
} while (*state!=STOP_REQ && Status==OK);
|
||||
|
||||
audioDecoder->StopClip();
|
||||
@@ -377,7 +377,7 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state,
|
||||
|
||||
swr_free(&swr);
|
||||
av_free(outbuf);
|
||||
av_free_packet(&rpacket);
|
||||
av_packet_unref(&rpacket);
|
||||
av_frame_free(&frame);
|
||||
avcodec_close(c);
|
||||
//av_free(avcc);
|
||||
|
Reference in New Issue
Block a user