Remove unnecessary calls to av_packet_unref()

av_packet_free() already calls av_packet_unref().
This commit is contained in:
Romain Vimont 2021-07-04 12:19:52 +02:00
parent 5caeab5f6d
commit e9096e3e34
2 changed files with 0 additions and 3 deletions

View file

@ -51,7 +51,6 @@ record_packet_new(const AVPacket *packet) {
static void static void
record_packet_delete(struct record_packet *rec) { record_packet_delete(struct record_packet *rec) {
av_packet_unref(rec->packet);
av_packet_free(&rec->packet); av_packet_free(&rec->packet);
free(rec); free(rec);
} }

View file

@ -151,7 +151,6 @@ stream_push_packet(struct stream *stream, AVPacket *packet) {
if (stream->pending) { if (stream->pending) {
// the pending packet must be discarded (consumed or error) // the pending packet must be discarded (consumed or error)
av_packet_unref(stream->pending);
av_packet_free(&stream->pending); av_packet_free(&stream->pending);
} }
@ -244,7 +243,6 @@ run_stream(void *data) {
LOGD("End of frames"); LOGD("End of frames");
if (stream->pending) { if (stream->pending) {
av_packet_unref(stream->pending);
av_packet_free(&stream->pending); av_packet_free(&stream->pending);
} }